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
Kirill Smelkov
cython
Commits
1b8bb1bf
Commit
1b8bb1bf
authored
May 20, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use C99 compound literals (enables compilation on g++ 4.2.4)
parent
a18effd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+8
-4
No files found.
Cython/Compiler/PyrexTypes.py
View file @
1b8bb1bf
...
@@ -830,7 +830,9 @@ proto="""
...
@@ -830,7 +830,9 @@ proto="""
#if __PYX_USE_C99_COMPLEX
#if __PYX_USE_C99_COMPLEX
typedef %(real_type)s _Complex %(type_name)s;
typedef %(real_type)s _Complex %(type_name)s;
#define %(type_name)s_from_parts(x, y) ((x) + (y)*(%(type)s)_Complex_I)
static INLINE %(type)s %(type_name)s_from_parts(%(real_type)s x, %(real_type)s y) {
return x + y*(%(type)s)_Complex_I;
}
#define %(type_name)s_is_zero(a) ((a) == 0)
#define %(type_name)s_is_zero(a) ((a) == 0)
#define %(type_name)s_eq(a, b) ((a) == (b))
#define %(type_name)s_eq(a, b) ((a) == (b))
...
@@ -843,7 +845,9 @@ proto="""
...
@@ -843,7 +845,9 @@ proto="""
#else
#else
typedef struct { %(real_type)s real, imag; } %(type_name)s;
typedef struct { %(real_type)s real, imag; } %(type_name)s;
#define %(type_name)s_from_parts(x, y) ((%(type_name)s){(%(real_type)s)x, (%(real_type)s)y})
static INLINE %(type)s %(type_name)s_from_parts(%(real_type)s x, %(real_type)s y) {
%(type)s c; c.real = x; c.imag = y; return c;
}
static INLINE int %(type_name)s_is_zero(%(type)s a) {
static INLINE int %(type_name)s_is_zero(%(type)s a) {
return (a.real == 0) & (a.imag == 0);
return (a.real == 0) & (a.imag == 0);
...
...
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