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
c384f012
Commit
c384f012
authored
Feb 22, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore some over-eager 3.1 removals.
parent
bc4ae58e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
15 deletions
+27
-15
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+2
-2
Cython/Utility/Buffer.c
Cython/Utility/Buffer.c
+0
-3
Cython/Utility/Builtins.c
Cython/Utility/Builtins.c
+4
-0
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+4
-0
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+8
-6
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+2
-2
Cython/Utility/StringTools.c
Cython/Utility/StringTools.c
+6
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
c384f012
...
@@ -3995,7 +3995,7 @@ class SliceIndexNode(ExprNode):
...
@@ -3995,7 +3995,7 @@ class SliceIndexNode(ExprNode):
TempitaUtilityCode
.
load_cached
(
"SliceTupleAndList"
,
"ObjectHandling.c"
))
TempitaUtilityCode
.
load_cached
(
"SliceTupleAndList"
,
"ObjectHandling.c"
))
cfunc
=
'__Pyx_PyTuple_GetSlice'
cfunc
=
'__Pyx_PyTuple_GetSlice'
else
:
else
:
cfunc
=
'
__Pyx_
PySequence_GetSlice'
cfunc
=
'PySequence_GetSlice'
code
.
putln
(
code
.
putln
(
"%s = %s(%s, %s, %s); %s"
%
(
"%s = %s(%s, %s, %s); %s"
%
(
result
,
result
,
...
...
Cython/Compiler/Main.py
View file @
c384f012
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
#
#
import
os
,
sys
,
re
,
codecs
import
os
,
sys
,
re
,
codecs
if
sys
.
version_info
[:
2
]
<
(
2
,
6
):
if
sys
.
version_info
[:
2
]
<
(
2
,
6
)
or
(
3
,
0
)
<=
sys
.
version_info
[:
2
]
<
(
3
,
2
)
:
sys
.
stderr
.
write
(
"Sorry, Cython requires Python 2.6
or later
\
n
"
)
sys
.
stderr
.
write
(
"Sorry, Cython requires Python 2.6
+ or 3.2+
\
n
"
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
import
Errors
import
Errors
...
...
Cython/Utility/Buffer.c
View file @
c384f012
...
@@ -134,9 +134,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
...
@@ -134,9 +134,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
{{
endif
}}
{{
endif
}}
{{
endfor
}}
{{
endfor
}}
goto
nofail
;
nofail:
Py_DECREF
(
obj
);
Py_DECREF
(
obj
);
view
->
obj
=
NULL
;
view
->
obj
=
NULL
;
}
}
...
...
Cython/Utility/Builtins.c
View file @
c384f012
...
@@ -130,7 +130,11 @@ static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals)
...
@@ -130,7 +130,11 @@ static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals)
"code object passed to exec() may not contain free variables"
);
"code object passed to exec() may not contain free variables"
);
goto
bad
;
goto
bad
;
}
}
#if PY_VERSION_HEX < 0x030200B1
result
=
PyEval_EvalCode
((
PyCodeObject
*
)
o
,
globals
,
locals
);
#else
result
=
PyEval_EvalCode
(
o
,
globals
,
locals
);
result
=
PyEval_EvalCode
(
o
,
globals
,
locals
);
#endif
}
else
{
}
else
{
PyCompilerFlags
cf
;
PyCompilerFlags
cf
;
cf
.
cf_flags
=
0
;
cf
.
cf_flags
=
0
;
...
...
Cython/Utility/CythonFunction.c
View file @
c384f012
...
@@ -1147,7 +1147,11 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
...
@@ -1147,7 +1147,11 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
}
}
if
(
PyObject_TypeCheck
(
method
,
methoddescr_type
))
{
/* cdef classes */
if
(
PyObject_TypeCheck
(
method
,
methoddescr_type
))
{
/* cdef classes */
PyMethodDescrObject
*
descr
=
(
PyMethodDescrObject
*
)
method
;
PyMethodDescrObject
*
descr
=
(
PyMethodDescrObject
*
)
method
;
#if PY_VERSION_HEX < 0x03020000
PyTypeObject
*
d_type
=
descr
->
d_type
;
#else
PyTypeObject
*
d_type
=
descr
->
d_common
.
d_type
;
PyTypeObject
*
d_type
=
descr
->
d_common
.
d_type
;
#endif
return
PyDescr_NewClassMethod
(
d_type
,
descr
->
d_method
);
return
PyDescr_NewClassMethod
(
d_type
,
descr
->
d_method
);
}
}
#endif
#endif
...
...
Cython/Utility/ModuleSetupCode.c
View file @
c384f012
...
@@ -157,12 +157,14 @@
...
@@ -157,12 +157,14 @@
#define PyBoolObject PyLongObject
#define PyBoolObject PyLongObject
#endif
#endif
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
#if PY_VERSION_HEX < 0x030200A4
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
typedef
long
Py_hash_t
;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
#define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
#else
#define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
#define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
...
...
Cython/Utility/ObjectHandling.c
View file @
c384f012
...
@@ -158,7 +158,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject*
...
@@ -158,7 +158,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject*
if
(
likely
(
next
))
if
(
likely
(
next
))
return
next
;
return
next
;
#if CYTHON_COMPILING_IN_CPYTHON
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_
MAJOR_VERSION >= 3 || (PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000)
#if PY_
VERSION_HEX >= 0x02070000
if
(
unlikely
(
iternext
==
&
_PyObject_NextNotImplemented
))
if
(
unlikely
(
iternext
==
&
_PyObject_NextNotImplemented
))
return
NULL
;
return
NULL
;
#endif
#endif
...
@@ -1029,7 +1029,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
...
@@ -1029,7 +1029,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
/////////////// PyObjectLookupSpecial.proto ///////////////
/////////////// PyObjectLookupSpecial.proto ///////////////
//@requires: PyObjectGetAttrStr
//@requires: PyObjectGetAttrStr
#if CYTHON_COMPILING_IN_CPYTHON &&
(PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000)
#if CYTHON_COMPILING_IN_CPYTHON &&
PY_VERSION_HEX >= 0x02070000
// looks like calling _PyType_Lookup() isn't safe in Py<=2.6/3.1
// looks like calling _PyType_Lookup() isn't safe in Py<=2.6/3.1
static
CYTHON_INLINE
PyObject
*
__Pyx_PyObject_LookupSpecial
(
PyObject
*
obj
,
PyObject
*
attr_name
)
{
static
CYTHON_INLINE
PyObject
*
__Pyx_PyObject_LookupSpecial
(
PyObject
*
obj
,
PyObject
*
attr_name
)
{
PyObject
*
res
;
PyObject
*
res
;
...
...
Cython/Utility/StringTools.c
View file @
c384f012
...
@@ -515,7 +515,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
...
@@ -515,7 +515,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
// Py_UNICODE_ISTITLE() doesn't match unicode.istitle() as the latter
// Py_UNICODE_ISTITLE() doesn't match unicode.istitle() as the latter
// additionally allows character that comply with Py_UNICODE_ISUPPER()
// additionally allows character that comply with Py_UNICODE_ISUPPER()
static
CYTHON_INLINE
int
__Pyx_Py_UNICODE_ISTITLE
(
Py_UCS4
uchar
)
{
#if PY_VERSION_HEX < 0x030200A2
static
CYTHON_INLINE
int
__Pyx_Py_UNICODE_ISTITLE
(
Py_UNICODE
uchar
)
#else
static
CYTHON_INLINE
int
__Pyx_Py_UNICODE_ISTITLE
(
Py_UCS4
uchar
)
#endif
{
return
Py_UNICODE_ISTITLE
(
uchar
)
||
Py_UNICODE_ISUPPER
(
uchar
);
return
Py_UNICODE_ISTITLE
(
uchar
)
||
Py_UNICODE_ISUPPER
(
uchar
);
}
}
...
...
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