Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6d1ea1

Browse files
committed
Change the type of the tp_free from 'destructor' to 'freefunc'.
1 parent 2bbdba3 commit f6d1ea1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Include/object.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ typedef struct {
199199
} PyBufferProcs;
200200

201201

202+
typedef void (*freefunc)(void *);
202203
typedef void (*destructor)(PyObject *);
203204
typedef int (*printfunc)(PyObject *, FILE *, int);
204205
typedef PyObject *(*getattrfunc)(PyObject *, char *);
@@ -284,7 +285,7 @@ typedef struct _typeobject {
284285
initproc tp_init;
285286
allocfunc tp_alloc;
286287
newfunc tp_new;
287-
destructor tp_free; /* Low-level free-memory routine */
288+
freefunc tp_free; /* Low-level free-memory routine */
288289
inquiry tp_is_gc; /* For PyObject_IS_GC */
289290
PyObject *tp_bases;
290291
PyObject *tp_mro; /* method resolution order */

0 commit comments

Comments
 (0)