Add initialisers for additional members in PyHeapTypeObject
(builtin mode) for Python-3.11 - _ht_tpname, _spec_cache.
This commit is contained in:
parent
54e7bb606e
commit
1d56bc6b85
3 changed files with 16 additions and 1 deletions
|
|
@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.1.0 (in progress)
|
Version 4.1.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2022-08-01: wsfulton
|
||||||
|
[Python] Add initialisers for additional members in PyHeapTypeObject
|
||||||
|
(builtin mode) for Python-3.11 - _ht_tpname, _spec_cache.
|
||||||
|
|
||||||
2022-07-30: wsfulton
|
2022-07-30: wsfulton
|
||||||
C++20 has deprecated std::basic_string<>::reserve() and the C++11 method
|
C++20 has deprecated std::basic_string<>::reserve() and the C++11 method
|
||||||
std::basic_string<>::shrink_to_fit() is a replacement that can be used.
|
std::basic_string<>::shrink_to_fit() is a replacement that can be used.
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,7 @@ SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
|
||||||
SWIGINTERN void
|
SWIGINTERN void
|
||||||
SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
|
SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
|
||||||
{
|
{
|
||||||
#if PY_VERSION_HEX >= 0x030900A4
|
#if PY_VERSION_HEX >= 0x030900a4
|
||||||
Py_SET_TYPE(type, metatype);
|
Py_SET_TYPE(type, metatype);
|
||||||
#else
|
#else
|
||||||
Py_TYPE(type) = metatype;
|
Py_TYPE(type) = metatype;
|
||||||
|
|
|
||||||
|
|
@ -4348,9 +4348,20 @@ public:
|
||||||
printSlot(f, getSlot(n, "feature:python:ht_cached_keys"), "ht_cached_keys");
|
printSlot(f, getSlot(n, "feature:python:ht_cached_keys"), "ht_cached_keys");
|
||||||
Printv(f, "#endif\n", NIL);
|
Printv(f, "#endif\n", NIL);
|
||||||
|
|
||||||
|
// PyObject *ht_module;
|
||||||
Printv(f, "#if PY_VERSION_HEX >= 0x03090000\n", NIL);
|
Printv(f, "#if PY_VERSION_HEX >= 0x03090000\n", NIL);
|
||||||
printSlot(f, getSlot(n, "feature:python:ht_module"), "ht_module", "PyObject *");
|
printSlot(f, getSlot(n, "feature:python:ht_module"), "ht_module", "PyObject *");
|
||||||
Printv(f, "#endif\n", NIL);
|
Printv(f, "#endif\n", NIL);
|
||||||
|
|
||||||
|
// char *_ht_tpname;
|
||||||
|
Printv(f, "#if PY_VERSION_HEX >= 0x030b0000\n", NIL);
|
||||||
|
printSlot(f, getSlot(n, "feature:python:_ht_tpname"), "_ht_tpname", "char *");
|
||||||
|
|
||||||
|
// struct _specialization_cache _spec_cache;
|
||||||
|
Printf(f, " {\n");
|
||||||
|
printSlot(f, getSlot(n, "feature:python:getitem"), "getitem", "PyObject *");
|
||||||
|
Printf(f, " }\n");
|
||||||
|
Printv(f, "#endif\n", NIL);
|
||||||
Printf(f, "};\n\n");
|
Printf(f, "};\n\n");
|
||||||
|
|
||||||
String *clientdata = NewString("");
|
String *clientdata = NewString("");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue