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
Gwenaël Samain
cython
Commits
571b4bc0
Commit
571b4bc0
authored
Nov 11, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use __Pyx_PyIndex_Check instead of PyIndex_Check
parent
a762a4d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
Cython/Includes/cpython/number.pxd
Cython/Includes/cpython/number.pxd
+1
-1
Cython/Utility/MemoryView.pyx
Cython/Utility/MemoryView.pyx
+1
-1
Cython/Utility/MemoryView_C.c
Cython/Utility/MemoryView_C.c
+0
-6
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+4
-1
No files found.
Cython/Includes/cpython/number.pxd
View file @
571b4bc0
...
...
@@ -246,6 +246,6 @@ cdef extern from "Python.h":
# and the value is clipped to PY_SSIZE_T_MIN for a negative
# integer or PY_SSIZE_T_MAX for a positive integer.
bint
PyIndex_Check
(
object
o
)
bint
PyIndex_Check
"__Pyx_PyIndex_Check"
(
object
)
# Returns True if o is an index integer (has the nb_index slot of
# the tp_as_number structure filled in).
Cython/Utility/MemoryView.pyx
View file @
571b4bc0
...
...
@@ -6,7 +6,7 @@ import cython
# from cpython cimport ...
cdef
extern
from
"Python.h"
:
int
PyIndex_Check
(
object
)
int
PyIndex_Check
"__Pyx_PyIndex_Check"
(
object
)
object
PyLong_FromVoidPtr
(
void
*
)
cdef
extern
from
"pythread.h"
:
...
...
Cython/Utility/MemoryView_C.c
View file @
571b4bc0
...
...
@@ -115,12 +115,6 @@ static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(__pyx_atomic_int *ac
#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
static
CYTHON_INLINE
void
__Pyx_INC_MEMVIEW
({{
memviewslice_name
}}
*
,
int
,
int
);
static
CYTHON_INLINE
void
__Pyx_XDEC_MEMVIEW
({{
memviewslice_name
}}
*
,
int
,
int
);
#if PY_VERSION_HEX < 0x02050000
/* NumPy headers define PyIndex_Check incorrectly */
#undef PyIndex_Check
#define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
#endif
/////////////// MemviewSliceIndex.proto ///////////////
static
CYTHON_INLINE
char
*
__pyx_memviewslice_index_full
(
const
char
*
bufp
,
Py_ssize_t
idx
,
Py_ssize_t
stride
,
Py_ssize_t
suboffset
);
...
...
Cython/Utility/ModuleSetupCode.c
View file @
571b4bc0
...
...
@@ -52,12 +52,15 @@
(PyErr_Format(PyExc_TypeError, \
"expected index value, got %.200s", Py_TYPE(o)->tp_name), \
(PyObject*)0))
#define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
#define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
!PyComplex_Check(o))
#define PyIndex_Check __Pyx_PyIndex_Check
#define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#define __PYX_BUILD_PY_SSIZE_T "i"
#else
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
...
...
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