Use Py_TYPE in SwigPyBuiltin_SetMetaType
This commit is contained in:
parent
917110212e
commit
eafe1e2daa
1 changed files with 1 additions and 5 deletions
|
|
@ -414,11 +414,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 >= 0x03000000 && !defined(PYPY_VERSION)
|
Py_TYPE(type) = metatype;
|
||||||
type->ob_base.ob_base.ob_type = metatype;
|
|
||||||
#else
|
|
||||||
type->ob_type = metatype;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue