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
Kirill Smelkov
cython
Commits
53327193
Commit
53327193
authored
Sep 29, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use concrete macro for "tp_finalize" usage everywhere instead of Python version check.
parent
2c517ecc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+1
-1
Cython/Utility/AsyncGen.c
Cython/Utility/AsyncGen.c
+3
-3
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+5
-5
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+2
-2
No files found.
Cython/Compiler/TypeSlots.py
View file @
53327193
...
@@ -873,7 +873,7 @@ slot_table = (
...
@@ -873,7 +873,7 @@ slot_table = (
EmptySlot
(
"tp_weaklist"
),
EmptySlot
(
"tp_weaklist"
),
EmptySlot
(
"tp_del"
),
EmptySlot
(
"tp_del"
),
EmptySlot
(
"tp_version_tag"
),
EmptySlot
(
"tp_version_tag"
),
EmptySlot
(
"tp_finalize"
,
ifdef
=
"
PY_VERSION_HEX >= 0x030400a1
"
),
EmptySlot
(
"tp_finalize"
,
ifdef
=
"
CYTHON_USE_TP_FINALIZE
"
),
)
)
#------------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------
...
...
Cython/Utility/AsyncGen.c
View file @
53327193
...
@@ -620,7 +620,7 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = {
...
@@ -620,7 +620,7 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = {
0
,
/* tp_weaklist */
0
,
/* tp_weaklist */
0
,
/* tp_del */
0
,
/* tp_del */
0
,
/* tp_version_tag */
0
,
/* tp_version_tag */
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/* tp_finalize */
0
,
/* tp_finalize */
#endif
#endif
};
};
...
@@ -729,7 +729,7 @@ static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = {
...
@@ -729,7 +729,7 @@ static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = {
0
,
/* tp_weaklist */
0
,
/* tp_weaklist */
0
,
/* tp_del */
0
,
/* tp_del */
0
,
/* tp_version_tag */
0
,
/* tp_version_tag */
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/* tp_finalize */
0
,
/* tp_finalize */
#endif
#endif
};
};
...
@@ -1006,7 +1006,7 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = {
...
@@ -1006,7 +1006,7 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = {
0
,
/* tp_weaklist */
0
,
/* tp_weaklist */
0
,
/* tp_del */
0
,
/* tp_del */
0
,
/* tp_version_tag */
0
,
/* tp_version_tag */
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/* tp_finalize */
0
,
/* tp_finalize */
#endif
#endif
};
};
...
...
Cython/Utility/Coroutine.c
View file @
53327193
...
@@ -1071,7 +1071,7 @@ static void __Pyx_Coroutine_dealloc(PyObject *self) {
...
@@ -1071,7 +1071,7 @@ static void __Pyx_Coroutine_dealloc(PyObject *self) {
if
(
gen
->
resume_label
>=
0
)
{
if
(
gen
->
resume_label
>=
0
)
{
// Generator is paused or unstarted, so we need to close
// Generator is paused or unstarted, so we need to close
PyObject_GC_Track
(
self
);
PyObject_GC_Track
(
self
);
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
if
(
PyObject_CallFinalizerFromDealloc
(
self
))
if
(
PyObject_CallFinalizerFromDealloc
(
self
))
#else
#else
Py_TYPE
(
gen
)
->
tp_del
(
self
);
Py_TYPE
(
gen
)
->
tp_del
(
self
);
...
@@ -1106,7 +1106,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
...
@@ -1106,7 +1106,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
return
;
return
;
}
}
#if
PY_VERSION_HEX < 0x030400a1
#if
!CYTHON_USE_TP_FINALIZE
// Temporarily resurrect the object.
// Temporarily resurrect the object.
assert
(
self
->
ob_refcnt
==
0
);
assert
(
self
->
ob_refcnt
==
0
);
self
->
ob_refcnt
=
1
;
self
->
ob_refcnt
=
1
;
...
@@ -1187,7 +1187,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
...
@@ -1187,7 +1187,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
// Restore the saved exception.
// Restore the saved exception.
__Pyx_ErrRestore
(
error_type
,
error_value
,
error_traceback
);
__Pyx_ErrRestore
(
error_type
,
error_value
,
error_traceback
);
#if
PY_VERSION_HEX < 0x030400a1
#if
!CYTHON_USE_TP_FINALIZE
// Undo the temporary resurrection; can't use DECREF here, it would
// Undo the temporary resurrection; can't use DECREF here, it would
// cause a recursive call.
// cause a recursive call.
assert
(
self
->
ob_refcnt
>
0
);
assert
(
self
->
ob_refcnt
>
0
);
...
@@ -1430,7 +1430,7 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = {
...
@@ -1430,7 +1430,7 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = {
0
,
/*tp_weaklist*/
0
,
/*tp_weaklist*/
0
,
/*tp_del*/
0
,
/*tp_del*/
0
,
/*tp_version_tag*/
0
,
/*tp_version_tag*/
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/*tp_finalize*/
0
,
/*tp_finalize*/
#endif
#endif
};
};
...
@@ -2055,7 +2055,7 @@ static PyTypeObject __Pyx__PyExc_StopAsyncIteration_type = {
...
@@ -2055,7 +2055,7 @@ static PyTypeObject __Pyx__PyExc_StopAsyncIteration_type = {
0
,
/*tp_weaklist*/
0
,
/*tp_weaklist*/
0
,
/*tp_del*/
0
,
/*tp_del*/
0
,
/*tp_version_tag*/
0
,
/*tp_version_tag*/
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/*tp_finalize*/
0
,
/*tp_finalize*/
#endif
#endif
};
};
...
...
Cython/Utility/CythonFunction.c
View file @
53327193
...
@@ -722,7 +722,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
...
@@ -722,7 +722,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
0
,
/*tp_weaklist*/
0
,
/*tp_weaklist*/
0
,
/*tp_del*/
0
,
/*tp_del*/
0
,
/*tp_version_tag*/
0
,
/*tp_version_tag*/
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/*tp_finalize*/
0
,
/*tp_finalize*/
#endif
#endif
};
};
...
@@ -1195,7 +1195,7 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
...
@@ -1195,7 +1195,7 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
0
,
/*tp_weaklist*/
0
,
/*tp_weaklist*/
0
,
/*tp_del*/
0
,
/*tp_del*/
0
,
/*tp_version_tag*/
0
,
/*tp_version_tag*/
#if
PY_VERSION_HEX >= 0x030400a1
#if
CYTHON_USE_TP_FINALIZE
0
,
/*tp_finalize*/
0
,
/*tp_finalize*/
#endif
#endif
};
};
...
...
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