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
07ef7b16
Commit
07ef7b16
authored
Oct 28, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to compile sage.
Was giving a gcc error for a local named "zero"
parent
91c2f9b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+8
-8
No files found.
Cython/Compiler/PyrexTypes.py
View file @
07ef7b16
...
@@ -621,8 +621,8 @@ static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject *);
...
@@ -621,8 +621,8 @@ static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject *);
"""
,
"""
,
impl
=
"""
impl
=
"""
static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject* x) {
static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject* x) {
const %(type)s neg_one = (%(type)s)-1, zero = 0;
const %(type)s neg_one = (%(type)s)-1,
const_
zero = 0;
const int is_unsigned = neg_one > zero;
const int is_unsigned = neg_one >
const_
zero;
if (sizeof(%(type)s) < sizeof(long)) {
if (sizeof(%(type)s) < sizeof(long)) {
long val = __Pyx_PyInt_AsLong(x);
long val = __Pyx_PyInt_AsLong(x);
if (unlikely(val != (long)(%(type)s)val)) {
if (unlikely(val != (long)(%(type)s)val)) {
...
@@ -646,8 +646,8 @@ static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject *);
...
@@ -646,8 +646,8 @@ static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject *);
"""
,
"""
,
impl
=
"""
impl
=
"""
static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject* x) {
static INLINE %(type)s __Pyx_PyInt_As%(SignWord)s%(TypeName)s(PyObject* x) {
const %(type)s neg_one = (%(type)s)-1, zero = 0;
const %(type)s neg_one = (%(type)s)-1,
const_
zero = 0;
const int is_unsigned = neg_one > zero;
const int is_unsigned = neg_one >
const_
zero;
#if PY_VERSION_HEX < 0x03000000
#if PY_VERSION_HEX < 0x03000000
if (likely(PyInt_Check(x))) {
if (likely(PyInt_Check(x))) {
long val = PyInt_AS_LONG(x);
long val = PyInt_AS_LONG(x);
...
@@ -687,8 +687,8 @@ static INLINE %(type)s __Pyx_PyInt_from_py_%(TypeName)s(PyObject *);
...
@@ -687,8 +687,8 @@ static INLINE %(type)s __Pyx_PyInt_from_py_%(TypeName)s(PyObject *);
"""
,
"""
,
impl
=
"""
impl
=
"""
static INLINE %(type)s __Pyx_PyInt_from_py_%(TypeName)s(PyObject* x) {
static INLINE %(type)s __Pyx_PyInt_from_py_%(TypeName)s(PyObject* x) {
const %(type)s neg_one = (%(type)s)-1, zero = 0;
const %(type)s neg_one = (%(type)s)-1,
const_
zero = 0;
const int is_unsigned = neg_one > zero;
const int is_unsigned = neg_one >
const_
zero;
if (sizeof(%(type)s) == sizeof(char)) {
if (sizeof(%(type)s) == sizeof(char)) {
if (is_unsigned)
if (is_unsigned)
return (%(type)s)__Pyx_PyInt_AsUnsignedChar(x);
return (%(type)s)__Pyx_PyInt_AsUnsignedChar(x);
...
@@ -734,8 +734,8 @@ static INLINE PyObject *__Pyx_PyInt_to_py_%(TypeName)s(%(type)s);
...
@@ -734,8 +734,8 @@ static INLINE PyObject *__Pyx_PyInt_to_py_%(TypeName)s(%(type)s);
"""
,
"""
,
impl
=
"""
impl
=
"""
static INLINE PyObject *__Pyx_PyInt_to_py_%(TypeName)s(%(type)s val) {
static INLINE PyObject *__Pyx_PyInt_to_py_%(TypeName)s(%(type)s val) {
const %(type)s neg_one = (%(type)s)-1, zero = 0;
const %(type)s neg_one = (%(type)s)-1,
const_
zero = 0;
const int is_unsigned = neg_one > zero;
const int is_unsigned = neg_one >
const_
zero;
if (sizeof(%(type)s) < sizeof(long)) {
if (sizeof(%(type)s) < sizeof(long)) {
return PyInt_FromLong((long)val);
return PyInt_FromLong((long)val);
} else if (sizeof(%(type)s) == sizeof(long)) {
} else if (sizeof(%(type)s) == sizeof(long)) {
...
...
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