[Python-checkins] cpython (3.5): add Py_tp_finalize slot (closes #24345)

benjamin.peterson python-checkins at python.org
Mon Jun 1 17:14:41 CEST 2015


https://hg.python.org/cpython/rev/5a354de919aa
changeset:   96450:5a354de919aa
branch:      3.5
parent:      96448:bbb3a3129c12
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Jun 01 10:12:48 2015 -0500
summary:
  add Py_tp_finalize slot (closes #24345)

Patch from Petr Viktorin.

files:
  Include/typeslots.h   |  1 +
  Misc/NEWS             |  2 ++
  Objects/typeslots.inc |  1 +
  3 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Include/typeslots.h b/Include/typeslots.h
--- a/Include/typeslots.h
+++ b/Include/typeslots.h
@@ -79,3 +79,4 @@
 #define Py_am_await 77
 #define Py_am_aiter 78
 #define Py_am_anext 79
+#define Py_tp_finalize 80
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@
 Core and Builtins
 -----------------
 
+- Issue #24345: Add Py_tp_finalize slot for the stable ABI.
+
 Library
 -------
 
diff --git a/Objects/typeslots.inc b/Objects/typeslots.inc
--- a/Objects/typeslots.inc
+++ b/Objects/typeslots.inc
@@ -78,3 +78,4 @@
 offsetof(PyHeapTypeObject, as_async.am_await),
 offsetof(PyHeapTypeObject, as_async.am_aiter),
 offsetof(PyHeapTypeObject, as_async.am_anext),
+offsetof(PyHeapTypeObject, ht_type.tp_finalize),

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list