Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
ed7a5bb6
Commit
ed7a5bb6
authored
Jan 13, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify usage of overloaded C++ function in MSVC++, which complains about its ambiguity.
parent
02c762b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
Cython/Utility/Complex.c
Cython/Utility/Complex.c
+2
-1
tests/run/complex_int_T446.pyx
tests/run/complex_int_T446.pyx
+7
-2
tests/run/complex_int_T446_fix.h
tests/run/complex_int_T446_fix.h
+0
-3
No files found.
Cython/Utility/Complex.c
View file @
ed7a5bb6
...
@@ -279,7 +279,8 @@ static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) {
...
@@ -279,7 +279,8 @@ static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) {
}
}
}
else
{
}
else
{
r
=
__Pyx_c_abs
{{
func_suffix
}}(
a
);
r
=
__Pyx_c_abs
{{
func_suffix
}}(
a
);
theta
=
atan2
{{
m
}}(
a
.
imag
,
a
.
real
);
// MSVC++ seems to require the input casts.
theta
=
atan2
{{
m
}}(({{
real_type
}})
a
.
imag
,
({{
real_type
}})
a
.
real
);
}
}
lnr
=
log
{{
m
}}(
r
);
lnr
=
log
{{
m
}}(
r
);
z_r
=
exp
{{
m
}}(
lnr
*
b
.
real
-
theta
*
b
.
imag
);
z_r
=
exp
{{
m
}}(
lnr
*
b
.
real
-
theta
*
b
.
imag
);
...
...
tests/run/complex_int_T446.pyx
View file @
ed7a5bb6
...
@@ -2,8 +2,13 @@
...
@@ -2,8 +2,13 @@
import
cython
import
cython
cdef
extern
from
"complex_int_T446_fix.h"
:
cdef
extern
from
*
:
pass
"""
#if defined _MSC_VER && defined __cplusplus
#define CYTHON_CCOMPLEX 0
#endif
"""
def
test_arith
(
int
complex
a
,
int
complex
b
):
def
test_arith
(
int
complex
a
,
int
complex
b
):
"""
"""
...
...
tests/run/complex_int_T446_fix.h
deleted
100644 → 0
View file @
02c762b4
#if defined _MSC_VER && defined __cplusplus
#define CYTHON_CCOMPLEX 0
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment