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
Boxiang Sun
cython
Commits
d2b2680d
Commit
d2b2680d
authored
Sep 09, 2009
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use PyObject* type for arguments to PyErr_Restore() in Cython/Includes/python_exc.pxd
parent
77a581d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Cython/Includes/python_exc.pxd
Cython/Includes/python_exc.pxd
+1
-1
Cython/Runtime/refnanny.pyx
Cython/Runtime/refnanny.pyx
+5
-5
No files found.
Cython/Includes/python_exc.pxd
View file @
d2b2680d
...
...
@@ -87,7 +87,7 @@ cdef extern from "Python.h":
# needs to handle exceptions or by code that needs to save and
# restore the error indicator temporarily.
void
PyErr_Restore
(
object
type
,
object
value
,
object
traceback
)
void
PyErr_Restore
(
PyObject
*
type
,
PyObject
*
value
,
PyObject
*
traceback
)
# Set the error indicator from the three objects. If the error
# indicator is already set, it is cleared first. If the objects
# are NULL, the error indicator is cleared. Do not pass a NULL
...
...
Cython/Runtime/refnanny.pyx
View file @
d2b2680d
...
...
@@ -59,7 +59,7 @@ class Context(object):
else
:
return
None
c
pdef
report_unraisable
(
e
):
c
def
void
report_unraisable
(
object
e
):
try
:
print
"refnanny raised an exception: %s"
%
e
except
:
...
...
@@ -84,7 +84,7 @@ cdef PyObject* NewContext(char* funcname, int lineno, char* filename) except NUL
result
=
<
PyObject
*>
ctx
except
Exception
,
e
:
report_unraisable
(
e
)
PyErr_Restore
(
<
object
>
type
,
<
object
>
value
,
<
object
>
tb
)
PyErr_Restore
(
type
,
value
,
tb
)
return
result
cdef
void
GOTREF
(
PyObject
*
ctx
,
PyObject
*
p_obj
,
int
lineno
):
...
...
@@ -98,7 +98,7 @@ cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno):
(
<
object
>
ctx
).
regref
(
<
object
>
p_obj
,
lineno
,
False
)
except
Exception
,
e
:
report_unraisable
(
e
)
PyErr_Restore
(
<
object
>
type
,
<
object
>
value
,
<
object
>
tb
)
PyErr_Restore
(
type
,
value
,
tb
)
cdef
int
GIVEREF_and_report
(
PyObject
*
ctx
,
PyObject
*
p_obj
,
int
lineno
):
if
ctx
==
NULL
:
return
1
...
...
@@ -112,7 +112,7 @@ cdef int GIVEREF_and_report(PyObject* ctx, PyObject* p_obj, int lineno):
decref_ok
=
(
<
object
>
ctx
).
delref
(
<
object
>
p_obj
,
lineno
,
False
)
except
Exception
,
e
:
report_unraisable
(
e
)
PyErr_Restore
(
<
object
>
type
,
<
object
>
value
,
<
object
>
tb
)
PyErr_Restore
(
type
,
value
,
tb
)
return
decref_ok
cdef
void
GIVEREF
(
PyObject
*
ctx
,
PyObject
*
p_obj
,
int
lineno
):
...
...
@@ -141,7 +141,7 @@ cdef void FinishContext(PyObject** ctx):
report_unraisable
(
e
)
Py_DECREF
(
<
object
>
ctx
[
0
])
ctx
[
0
]
=
NULL
PyErr_Restore
(
<
object
>
type
,
<
object
>
value
,
<
object
>
tb
)
PyErr_Restore
(
type
,
value
,
tb
)
cdef
extern
from
"Python.h"
:
object
PyCObject_FromVoidPtr
(
void
*
,
void
(
*
)(
void
*
))
...
...
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