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
3dc5ccb1
Commit
3dc5ccb1
authored
Feb 12, 2009
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try handle missing T_PYSSIZET and T_SIZET definitions across Python versions (related to #207)
parent
05e53a29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+31
-3
No files found.
Cython/Compiler/PyrexTypes.py
View file @
3dc5ccb1
...
@@ -1196,8 +1196,8 @@ c_sint_type = CIntType(2, 2, "T_INT")
...
@@ -1196,8 +1196,8 @@ c_sint_type = CIntType(2, 2, "T_INT")
c_slong_type
=
CIntType
(
3
,
2
,
"T_LONG"
)
c_slong_type
=
CIntType
(
3
,
2
,
"T_LONG"
)
c_slonglong_type
=
CLongLongType
(
6
,
2
,
"T_LONGLONG"
)
c_slonglong_type
=
CLongLongType
(
6
,
2
,
"T_LONGLONG"
)
c_py_ssize_t_type
=
CPySSizeTType
(
4
,
2
)
c_py_ssize_t_type
=
CPySSizeTType
(
4
,
2
,
"T_PYSSIZET"
)
c_size_t_type
=
CSizeTType
(
5
,
0
)
c_size_t_type
=
CSizeTType
(
5
,
0
,
"T_SIZET"
)
c_float_type
=
CFloatType
(
7
,
"T_FLOAT"
)
c_float_type
=
CFloatType
(
7
,
"T_FLOAT"
)
c_double_type
=
CFloatType
(
8
,
"T_DOUBLE"
)
c_double_type
=
CFloatType
(
8
,
"T_DOUBLE"
)
...
@@ -1400,8 +1400,36 @@ type_conversion_predeclarations = """
...
@@ -1400,8 +1400,36 @@ type_conversion_predeclarations = """
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x);
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x);
static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x);
static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x);
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);
#if !defined(T_PYSSIZET)
#if PY_VERSION_HEX < 0x02050000
#define T_PYSSIZET T_INT
#elif !defined(T_LONGLONG)
#define T_PYSSIZET
\
\
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT :
\
\
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
#else
#define T_PYSSIZET
\
\
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT :
\
\
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG :
\
\
((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
#endif
#endif
#if !defined(T_SIZET)
#if !defined(T_ULONGLONG)
#define T_SIZET
\
\
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT :
\
\
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
#else
#define T_SIZET
\
\
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT :
\
\
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG :
\
\
((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
#endif
#endif
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);
static INLINE PyObject * __pyx_PyInt_FromSize_t(size_t);
static INLINE PyObject * __pyx_PyInt_FromSize_t(size_t);
static INLINE size_t __pyx_PyInt_AsSize_t(PyObject*);
static INLINE size_t __pyx_PyInt_AsSize_t(PyObject*);
...
...
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