Merge branch 'ahnolds-python34'
* ahnolds-python34: Python tp_allocs -> tp_next corrections Cosmetic correction for Python tp_version -> tp_version_tag Add -Wmissing-field-initializers to python Travis testing Python 3.3 builtin missing field initializers added Adding tp_finalize field to PyTypeObject for Python 3.4 and -builtin Adding nb_matrix_multiply and nb_inplace_matrix_multiply fields to PyNumberMethods for Python version 3.5 and up Adding tp_finalize field to PyTypeObject for Python version 3.4 and up
This commit is contained in:
commit
3e27d45b2a
5 changed files with 68 additions and 12 deletions
|
|
@ -433,10 +433,19 @@ SwigPyStaticVar_Type(void) {
|
|||
0, /* tp_del */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x02060000
|
||||
0, /* tp_version */
|
||||
0, /* tp_version_tag */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x03040000
|
||||
0, /* tp_finalize */
|
||||
#endif
|
||||
#ifdef COUNT_ALLOCS
|
||||
0,0,0,0 /* tp_alloc -> tp_next */
|
||||
0, /* tp_allocs */
|
||||
0, /* tp_frees */
|
||||
0, /* tp_maxalloc */
|
||||
#if PY_VERSION_HEX >= 0x02050000
|
||||
0, /* tp_prev */
|
||||
#endif
|
||||
0 /* tp_next */
|
||||
#endif
|
||||
};
|
||||
staticvar_type = tmp;
|
||||
|
|
|
|||
|
|
@ -183,10 +183,19 @@ swig_varlink_type(void) {
|
|||
0, /* tp_del */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x02060000
|
||||
0, /* tp_version */
|
||||
0, /* tp_version_tag */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x03040000
|
||||
0, /* tp_finalize */
|
||||
#endif
|
||||
#ifdef COUNT_ALLOCS
|
||||
0,0,0,0 /* tp_alloc -> tp_next */
|
||||
0, /* tp_allocs */
|
||||
0, /* tp_frees */
|
||||
0, /* tp_maxalloc */
|
||||
#if PY_VERSION_HEX >= 0x02050000
|
||||
0, /* tp_prev */
|
||||
#endif
|
||||
0 /* tp_next */
|
||||
#endif
|
||||
};
|
||||
varlink_type = tmp;
|
||||
|
|
|
|||
|
|
@ -725,7 +725,9 @@ SwigPyObject_TypeOnce(void) {
|
|||
(unaryfunc)SwigPyObject_oct, /*nb_oct*/
|
||||
(unaryfunc)SwigPyObject_hex, /*nb_hex*/
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
|
||||
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
|
||||
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
|
||||
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
|
||||
|
|
@ -805,10 +807,19 @@ SwigPyObject_TypeOnce(void) {
|
|||
0, /* tp_del */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x02060000
|
||||
0, /* tp_version */
|
||||
0, /* tp_version_tag */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x03040000
|
||||
0, /* tp_finalize */
|
||||
#endif
|
||||
#ifdef COUNT_ALLOCS
|
||||
0,0,0,0 /* tp_alloc -> tp_next */
|
||||
0, /* tp_allocs */
|
||||
0, /* tp_frees */
|
||||
0, /* tp_maxalloc */
|
||||
#if PY_VERSION_HEX >= 0x02050000
|
||||
0, /* tp_prev */
|
||||
#endif
|
||||
0 /* tp_next */
|
||||
#endif
|
||||
};
|
||||
swigpyobject_type = tmp;
|
||||
|
|
@ -984,10 +995,19 @@ SwigPyPacked_TypeOnce(void) {
|
|||
0, /* tp_del */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x02060000
|
||||
0, /* tp_version */
|
||||
0, /* tp_version_tag */
|
||||
#endif
|
||||
#if PY_VERSION_HEX >= 0x03040000
|
||||
0, /* tp_finalize */
|
||||
#endif
|
||||
#ifdef COUNT_ALLOCS
|
||||
0,0,0,0 /* tp_alloc -> tp_next */
|
||||
0, /* tp_allocs */
|
||||
0, /* tp_frees */
|
||||
0, /* tp_maxalloc */
|
||||
#if PY_VERSION_HEX >= 0x02050000
|
||||
0, /* tp_prev */
|
||||
#endif
|
||||
0 /* tp_next */
|
||||
#endif
|
||||
};
|
||||
swigpypacked_type = tmp;
|
||||
|
|
|
|||
|
|
@ -4050,6 +4050,18 @@ public:
|
|||
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);
|
||||
Printv(f, "#if PY_VERSION_HEX >= 0x03040000\n", NIL);
|
||||
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");
|
||||
Printv(f, "#if PY_VERSION_HEX >= 0x02050000\n", NIL);
|
||||
printSlot(f, getSlot(), "tp_prev", "struct _typeobject*");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
printSlot(f, getSlot(), "tp_next", "struct _typeobject*");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
Printf(f, " },\n");
|
||||
|
||||
// PyAsyncMethods as_async
|
||||
|
|
@ -4161,9 +4173,15 @@ public:
|
|||
Printv(f, "#endif\n", NIL);
|
||||
Printf(f, " },\n");
|
||||
|
||||
// PyObject *ht_name, *ht_slots
|
||||
// PyObject *ht_name, *ht_slots, *ht_qualname;
|
||||
printSlot(f, getSlot(n, "feature:python:ht_name"), "ht_name", "PyObject*");
|
||||
printSlot(f, getSlot(n, "feature:python:ht_slots"), "ht_slots", "PyObject*");
|
||||
Printv(f, "#if PY_VERSION_HEX >= 0x03030000\n", NIL);
|
||||
printSlot(f, getSlot(n, "feature:python:ht_qualname"), "ht_qualname", "PyObject*");
|
||||
|
||||
// struct _dictkeysobject *ht_cached_keys;
|
||||
printSlot(f, getSlot(n, "feature:python:ht_cached_keys"), "ht_cached_keys", "struct _dictkeysobject*");
|
||||
Printv(f, "#endif\n", NIL);
|
||||
Printf(f, "};\n\n");
|
||||
|
||||
String *clientdata = NewString("");
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ def get_cflags(language, std, compiler):
|
|||
"octave":"-Werror " + c_common,
|
||||
"perl5":"-Werror " + c_common,
|
||||
"php":"-Werror " + c_common,
|
||||
"python":"-Werror " + c_common,
|
||||
"python":"-Werror " + c_common + " -Wmissing-field-initializers",
|
||||
"r":"-Werror " + c_common,
|
||||
"ruby":"-Werror " + c_common,
|
||||
"scilab":"-Werror " + c_common,
|
||||
|
|
@ -44,7 +44,7 @@ def get_cxxflags(language, std, compiler):
|
|||
"octave":"-Werror " + cxx_common,
|
||||
"perl5":"-Werror " + cxx_common,
|
||||
"php":"-Werror " + cxx_common,
|
||||
"python":"-Werror " + cxx_common,
|
||||
"python":"-Werror " + cxx_common + " -Wmissing-field-initializers",
|
||||
"r":"-Werror " + cxx_common,
|
||||
"ruby":"-Werror " + cxx_common,
|
||||
"scilab": cxx_common,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue