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
Xavier Thompson
cython
Commits
1dba6bf2
Commit
1dba6bf2
authored
Jul 23, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use fallback code for C-line traceback configuration in PyPy instead of highly optimised version
parent
40dc125f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Cython/Utility/Exceptions.c
Cython/Utility/Exceptions.c
+7
-5
No files found.
Cython/Utility/Exceptions.c
View file @
1dba6bf2
...
...
@@ -541,11 +541,15 @@ static int __Pyx_CLineForTraceback(int c_line) {
#ifdef CYTHON_CLINE_IN_TRACEBACK
/* 0 or 1 to disable/enable C line display in tracebacks at C compile time */
return
((
CYTHON_CLINE_IN_TRACEBACK
))
?
c_line
:
0
;
#else
PyObject
**
cython_runtime_dict
;
PyObject
*
use_cline
;
cython_runtime_dict
=
_PyObject_GetDictPtr
(
$
{
cython_runtime_cname
});
if
(
unlikely
(
!
cython_runtime_dict
))
{
#if CYTHON_COMPILING_IN_CPYTHON
PyObject
**
cython_runtime_dict
=
_PyObject_GetDictPtr
(
$
{
cython_runtime_cname
});
if
(
likely
(
cython_runtime_dict
))
{
use_cline
=
PyDict_GetItem
(
*
_PyObject_GetDictPtr
(
$
{
cython_runtime_cname
}),
PYIDENT
(
"cline_in_traceback"
));
}
else
#endif
{
PyObject
*
ptype
,
*
pvalue
,
*
ptraceback
;
PyObject
*
use_cline_obj
;
PyErr_Fetch
(
&
ptype
,
&
pvalue
,
&
ptraceback
);
...
...
@@ -557,8 +561,6 @@ static int __Pyx_CLineForTraceback(int c_line) {
use_cline
=
NULL
;
}
PyErr_Restore
(
ptype
,
pvalue
,
ptraceback
);
}
else
{
use_cline
=
PyDict_GetItem
(
*
_PyObject_GetDictPtr
(
$
{
cython_runtime_cname
}),
PYIDENT
(
"cline_in_traceback"
));
}
if
(
!
use_cline
)
{
c_line
=
0
;
...
...
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