Add additional Python builtin slots as features for user customization
Added: - tp_is_gc - tp_bases - tp_mro - tp_cache - tp_subclasses - tp_weaklist - tp_del - tp_allocs - tp_frees - tp_maxalloc - tp_prev - tp_next
This commit is contained in:
parent
4f777b181c
commit
e5a09c4141
1 changed files with 12 additions and 12 deletions
|
|
@ -4118,13 +4118,13 @@ public:
|
|||
printSlot(f, getSlot(n, "feature:python:tp_alloc"), "tp_alloc", "allocfunc");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_new", tp_new), "tp_new", "newfunc");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_free"), "tp_free", "freefunc");
|
||||
printSlot(f, getSlot(), "tp_is_gc", "inquiry");
|
||||
printSlot(f, getSlot(), "tp_bases", "PyObject*");
|
||||
printSlot(f, getSlot(), "tp_mro", "PyObject*");
|
||||
printSlot(f, getSlot(), "tp_cache", "PyObject*");
|
||||
printSlot(f, getSlot(), "tp_subclasses", "PyObject*");
|
||||
printSlot(f, getSlot(), "tp_weaklist", "PyObject*");
|
||||
printSlot(f, getSlot(), "tp_del", "destructor");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_is_gc"), "tp_is_gc", "inquiry");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_bases"), "tp_bases", "PyObject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_mro"), "tp_mro", "PyObject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_cache"), "tp_cache", "PyObject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_subclasses"), "tp_subclasses", "PyObject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_weaklist"), "tp_weaklist", "PyObject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_del"), "tp_del", "destructor");
|
||||
Printv(f, "#if PY_VERSION_HEX >= 0x02060000\n", NIL);
|
||||
printSlot(f, getSlot(n, "feature:python:tp_version_tag"), "tp_version_tag", "int");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
|
|
@ -4132,13 +4132,13 @@ public:
|
|||
printSlot(f, getSlot(n, "feature:python:tp_finalize"), "tp_finalize", "destructor");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
Printv(f, "#ifdef COUNT_ALLOCS\n", NIL);
|
||||
printSlot(f, getSlot(), "tp_allocs", "Py_ssize_t");
|
||||
printSlot(f, getSlot(), "tp_frees", "Py_ssize_t");
|
||||
printSlot(f, getSlot(), "tp_maxalloc", "Py_ssize_t");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_allocs"), "tp_allocs", "Py_ssize_t");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_frees"), "tp_frees", "Py_ssize_t");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_maxalloc"), "tp_maxalloc", "Py_ssize_t");
|
||||
Printv(f, "#if PY_VERSION_HEX >= 0x02050000\n", NIL);
|
||||
printSlot(f, getSlot(), "tp_prev", "struct _typeobject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_prev"), "tp_prev", "struct _typeobject*");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
printSlot(f, getSlot(), "tp_next", "struct _typeobject*");
|
||||
printSlot(f, getSlot(n, "feature:python:tp_next"), "tp_next", "struct _typeobject*");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
Printf(f, " },\n");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue