From 0969a9f8abcf98bb43ea77b1dd050426adcfb4f7 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 1 Jun 2015 10:12:48 -0500 Subject: [PATCH] add Py_tp_finalize slot (closes #24345) Patch from Petr Viktorin. --- Include/typeslots.h | 1 + Misc/NEWS | 2 ++ Objects/typeslots.inc | 1 + 3 files changed, 4 insertions(+) diff --git a/Include/typeslots.h b/Include/typeslots.h index f56749dbedb..a89d73b823f 100644 --- 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 index 0d3a0f0d793..2de47f713a8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ Release date: 2015-07-05 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 index bcbe0af3b8f..dc750cc0c41 100644 --- a/Objects/typeslots.inc +++ b/Objects/typeslots.inc @@ -78,3 +78,4 @@ offsetof(PyHeapTypeObject, as_number.nb_inplace_matrix_multiply), offsetof(PyHeapTypeObject, as_async.am_await), offsetof(PyHeapTypeObject, as_async.am_aiter), offsetof(PyHeapTypeObject, as_async.am_anext), +offsetof(PyHeapTypeObject, ht_type.tp_finalize),