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
5bd3fd90
Commit
5bd3fd90
authored
May 03, 2018
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:cython/cython
parents
00ef9ff2
694442c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
Cython/Utility/Exceptions.c
Cython/Utility/Exceptions.c
+5
-3
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+24
-0
No files found.
Cython/Utility/Exceptions.c
View file @
5bd3fd90
...
...
@@ -611,7 +611,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);/*proto*/
//@substitute: naming
#ifndef CYTHON_CLINE_IN_TRACEBACK
static
int
__Pyx_CLineForTraceback
(
CYTHON_UNUSED
PyThreadState
*
tstate
,
int
c_line
)
{
static
int
__Pyx_CLineForTraceback
(
PyThreadState
*
tstate
,
int
c_line
)
{
PyObject
*
use_cline
;
PyObject
*
ptype
,
*
pvalue
,
*
ptraceback
;
#if CYTHON_COMPILING_IN_CPYTHON
...
...
@@ -622,7 +622,9 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li
#if CYTHON_COMPILING_IN_CPYTHON
cython_runtime_dict
=
_PyObject_GetDictPtr
(
$
{
cython_runtime_cname
});
if
(
likely
(
cython_runtime_dict
))
{
use_cline
=
__Pyx_PyDict_GetItemStr
(
*
cython_runtime_dict
,
PYIDENT
(
"cline_in_traceback"
));
__PYX_PY_DICT_LOOKUP_IF_MODIFIED
(
use_cline
,
*
cython_runtime_dict
,
__Pyx_PyDict_GetItemStr
(
*
cython_runtime_dict
,
PYIDENT
(
"cline_in_traceback"
)))
}
else
#endif
{
...
...
@@ -639,7 +641,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li
c_line
=
0
;
PyObject_SetAttr
(
$
{
cython_runtime_cname
},
PYIDENT
(
"cline_in_traceback"
),
Py_False
);
}
else
if
(
PyObject_Not
(
use_cline
)
!=
0
)
{
else
if
(
use_cline
==
Py_False
||
(
use_cline
!=
Py_True
&&
PyObject_Not
(
use_cline
)
!=
0
)
)
{
c_line
=
0
;
}
__Pyx_ErrRestoreInState
(
tstate
,
ptype
,
pvalue
,
ptraceback
);
...
...
Cython/Utility/ModuleSetupCode.c
View file @
5bd3fd90
...
...
@@ -79,6 +79,8 @@
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#elif defined(PYSTON_VERSION)
#define CYTHON_COMPILING_IN_PYPY 0
...
...
@@ -118,6 +120,8 @@
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
...
...
@@ -181,6 +185,9 @@
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
#endif
#ifndef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
#endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
...
...
@@ -407,6 +414,23 @@ class __Pyx_FakeReference {
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_USE_DICT_VERSIONS
#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) { \
static PY_UINT64_T __pyx_dict_version = 0; \
static PyObject *__pyx_dict_cached_value = NULL; \
if (__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version) { \
(VAR) = __pyx_dict_cached_value; \
} else { \
(VAR) = __pyx_dict_cached_value = (LOOKUP); \
__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT); \
} \
}
#else
#define __PYX_GET_DICT_VERSION(dict) (0)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
#define PyObject_Malloc(s) PyMem_Malloc(s)
#define PyObject_Free(p) PyMem_Free(p)
...
...
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