Commit 49103e45 authored by Stefan Behnel's avatar Stefan Behnel

Prefix an internal C macro with "__Pyx_" to avoid accidental namespace collisions with user code.

parent 94d6b73b
...@@ -11576,7 +11576,7 @@ class DivNode(NumBinopNode): ...@@ -11576,7 +11576,7 @@ class DivNode(NumBinopNode):
minus1_check = '(!(((%s)-1) > 0)) && unlikely(%s == (%s)-1)' % ( minus1_check = '(!(((%s)-1) > 0)) && unlikely(%s == (%s)-1)' % (
type_of_op2, self.operand2.result(), type_of_op2) type_of_op2, self.operand2.result(), type_of_op2)
code.putln("else if (sizeof(%s) == sizeof(long) && %s " 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(), self.type.empty_declaration_code(),
minus1_check, minus1_check,
self.operand1.result())) self.operand1.result()))
......
...@@ -305,7 +305,6 @@ static CYTHON_INLINE {{TYPE}} __Pyx_lshift_{{NAME}}_checking_overflow({{TYPE}} a ...@@ -305,7 +305,6 @@ static CYTHON_INLINE {{TYPE}} __Pyx_lshift_{{NAME}}_checking_overflow({{TYPE}} a
/////////////// UnaryNegOverflows.proto /////////////// /////////////// UnaryNegOverflows.proto ///////////////
//FIXME: shouldn't the macro name be prefixed by "__Pyx_" ? Too late now, I guess...
// from intobject.c // 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))) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment