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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
e49d3c7a
Commit
e49d3c7a
authored
May 14, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix obscure bug w/ complex (only present when compiling many files in one run)
parent
6b043aa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+8
-7
No files found.
Cython/Compiler/PyrexTypes.py
View file @
e49d3c7a
...
...
@@ -718,6 +718,7 @@ class CComplexType(CNumericType):
self
.
real_type
=
real_type
CNumericType
.
__init__
(
self
,
real_type
.
rank
+
0.5
,
real_type
.
signed
)
self
.
binops
=
{}
self
.
from_parts
=
"%s_from_parts"
%
self
.
specalization_name
()
def
__cmp__
(
self
,
other
):
if
isinstance
(
self
,
CComplexType
)
and
isinstance
(
other
,
CComplexType
):
...
...
@@ -737,13 +738,13 @@ class CComplexType(CNumericType):
or
src_type
is
error_type
)
def
create_declaration_utility_code
(
self
,
env
):
if
not
hasattr
(
self
,
'from_parts'
):
self
.
from_parts
=
"%s_from_parts"
%
self
.
specalization_name
(
)
env
.
use_utility_code
(
complex_generic_utility_code
)
env
.
use_utility_code
(
complex_arithmatic_utility_code
.
specialize
(
self
,
math_h_modifier
=
self
.
real_type
.
math_h_modifier
,
real_type
=
self
.
real_type
.
declaration_code
(
''
)))
# This must always be run, because a single CComplexType instance can be shared
# across multiple compilations (the one created in the module scope
)
env
.
use_utility_code
(
complex_generic_utility_code
)
env
.
use_utility_code
(
complex_arithmatic_utility_code
.
specialize
(
self
,
math_h_modifier
=
self
.
real_type
.
math_h_modifier
,
real_type
=
self
.
real_type
.
declaration_code
(
''
)))
return
True
def
create_from_py_utility_code
(
self
,
env
):
...
...
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