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
ae33c0ec
Commit
ae33c0ec
authored
Aug 25, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atexit._exithandlers is no longer available in Py3
parent
3c833d65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+5
-2
No files found.
Cython/Utility/ModuleSetupCode.c
View file @
ae33c0ec
...
...
@@ -583,7 +583,7 @@ static int __Pyx_RegisterCleanup(void) {
// Don't use Py_AtExit because that has a 32-call limit and is called
// after python finalization.
// Also, we try to prepend the cleanup function to "atexit._exithandlers"
// because CPython runs them last-to-first. Being run last allows
//
in Py2
because CPython runs them last-to-first. Being run last allows
// user exit code to run before us that may depend on the globals
// and cached objects that we are about to clean up.
...
...
@@ -603,6 +603,7 @@ static int __Pyx_RegisterCleanup(void) {
atexit
=
__Pyx_ImportModule
(
"atexit"
);
if
(
!
atexit
)
goto
bad
;
#if PY_MAJOR_VERSION < 3
reg
=
__Pyx_GetAttrString
(
atexit
,
"_exithandlers"
);
if
(
reg
&&
PyList_Check
(
reg
))
{
PyObject
*
a
,
*
kw
;
...
...
@@ -619,7 +620,9 @@ static int __Pyx_RegisterCleanup(void) {
if
(
!
args
)
goto
bad
;
ret
=
PyList_Insert
(
reg
,
0
,
args
);
}
else
{
}
else
#endif
{
if
(
!
reg
)
PyErr_Clear
();
Py_XDECREF
(
reg
);
...
...
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