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
f85c0c4e
Commit
f85c0c4e
authored
Mar 11, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refnanny unraisable fix.
parent
9cefe905
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
Cython/Runtime/refnanny.pyx
Cython/Runtime/refnanny.pyx
+10
-7
No files found.
Cython/Runtime/refnanny.pyx
View file @
f85c0c4e
...
...
@@ -59,8 +59,11 @@ class Context(object):
else
:
return
None
cdef
void
report_unraisable
(
object
e
):
cdef
void
report_unraisable
(
object
e
=
None
):
try
:
if
e
is
None
:
import
sys
e
=
sys
.
exc_info
()[
1
]
print
u"refnanny raised an exception: %s"
%
e
except
:
pass
# We absolutely cannot exit with an exception
...
...
@@ -97,8 +100,8 @@ cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno):
(
<
object
>
ctx
).
regref
(
None
,
lineno
,
True
)
else
:
(
<
object
>
ctx
).
regref
(
<
object
>
p_obj
,
lineno
,
False
)
except
object
,
e
:
report_unraisable
(
e
)
except
:
report_unraisable
()
except
:
# __Pyx_GetException may itself raise errors
pass
...
...
@@ -115,8 +118,8 @@ cdef int GIVEREF_and_report(PyObject* ctx, PyObject* p_obj, int lineno):
decref_ok
=
(
<
object
>
ctx
).
delref
(
None
,
lineno
,
True
)
else
:
decref_ok
=
(
<
object
>
ctx
).
delref
(
<
object
>
p_obj
,
lineno
,
False
)
except
object
,
e
:
report_unraisable
(
e
)
except
:
report_unraisable
()
except
:
# __Pyx_GetException may itself raise errors
pass
...
...
@@ -146,8 +149,8 @@ cdef void FinishContext(PyObject** ctx):
if
errors
:
print
u"%s: %s()"
%
pos
print
errors
except
Exception
,
e
:
report_unraisable
(
e
)
except
:
report_unraisable
()
except
:
# __Pyx_GetException may itself raise errors
pass
...
...
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