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
c62e213a
Commit
c62e213a
authored
Nov 17, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for setting real/imaginary parts for MSVC C++.
parent
6b8bbcb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+5
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+8
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
c62e213a
...
...
@@ -3091,6 +3091,11 @@ class AttributeNode(ExprNode):
rhs
.
py_result
()))
rhs
.
generate_disposal_code
(
code
)
rhs
.
free_temps
(
code
)
elif
self
.
obj
.
type
.
is_complex
:
code
.
putln
(
"__Pyx_SET_C%s(%s, %s);"
%
(
self
.
member
.
upper
(),
self
.
obj
.
result_as
(
self
.
obj
.
type
),
rhs
.
result_as
(
self
.
ctype
())))
else
:
if
(
self
.
obj
.
type
.
is_extension_type
and
self
.
needs_none_check
...
...
Cython/Compiler/PyrexTypes.py
View file @
c62e213a
...
...
@@ -1057,6 +1057,14 @@ proto="""
#define __Pyx_CREAL(z) ((z).real)
#define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
#define __Pyx_SET_CREAL(z,x) ((z).real(x))
#define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
#define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
#define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif
"""
)
complex_type_utility_code
=
UtilityCode
(
...
...
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