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
49103e45
Commit
49103e45
authored
Feb 03, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefix an internal C macro with "__Pyx_" to avoid accidental namespace collisions with user code.
parent
94d6b73b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
Cython/Utility/Overflow.c
Cython/Utility/Overflow.c
+1
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
49103e45
...
...
@@ -11576,7 +11576,7 @@ class DivNode(NumBinopNode):
minus1_check
=
'(!(((%s)-1) > 0)) && unlikely(%s == (%s)-1)'
%
(
type_of_op2
,
self
.
operand2
.
result
(),
type_of_op2
)
code
.
putln
(
"else if (sizeof(%s) == sizeof(long) && %s "
" && unlikely(UNARY_NEG_WOULD_OVERFLOW(%s))) {"
%
(
" && unlikely(
__Pyx_
UNARY_NEG_WOULD_OVERFLOW(%s))) {"
%
(
self
.
type
.
empty_declaration_code
(),
minus1_check
,
self
.
operand1
.
result
()))
...
...
Cython/Utility/Overflow.c
View file @
49103e45
...
...
@@ -305,7 +305,6 @@ static CYTHON_INLINE {{TYPE}} __Pyx_lshift_{{NAME}}_checking_overflow({{TYPE}} a
/////////////// UnaryNegOverflows.proto ///////////////
//FIXME: shouldn't the macro name be prefixed by "__Pyx_" ? Too late now, I guess...
// from intobject.c
#define UNARY_NEG_WOULD_OVERFLOW(x) \
#define
__Pyx_
UNARY_NEG_WOULD_OVERFLOW(x) \
(((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
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