Skip to content

Commit 2f7cbbb

Browse files
Replace obsolete, unsafe Py_TRASHCAN_SAFE_BEGIN/END
Use Py_TRASHCAN_BEGIN/END instead. https://bugs.python.org/issue44874 These are removed from the limited C API in Python 3.9, deprecated in 3.11, and removed in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html#id8
1 parent 1194a8a commit 2f7cbbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

asyncpg/protocol/record/recordobj.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ record_dealloc(ApgRecordObject *o)
9898

9999
Py_CLEAR(o->desc);
100100

101-
Py_TRASHCAN_SAFE_BEGIN(o)
101+
Py_TRASHCAN_BEGIN(o, record_dealloc)
102102
if (len > 0) {
103103
i = len;
104104
while (--i >= 0) {
@@ -117,7 +117,7 @@ record_dealloc(ApgRecordObject *o)
117117
}
118118
Py_TYPE(o)->tp_free((PyObject *)o);
119119
done:
120-
Py_TRASHCAN_SAFE_END(o)
120+
Py_TRASHCAN_END
121121
}
122122

123123

0 commit comments

Comments
 (0)