diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-10-03 18:49:42 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:08 -0300 |
commit | 1e29ab65924166688e352eaaa099ad571a980c4f (patch) | |
tree | 2a7ae3cb38b33a3211c9cec0da70016dd5d44c1d /libpyside/pysideweakref.cpp | |
parent | a2cb6fe0254a122f0ad9d2ee991d9a249903ee12 (diff) |
Initia QtCore port to python3.
Diffstat (limited to 'libpyside/pysideweakref.cpp')
-rw-r--r-- | libpyside/pysideweakref.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libpyside/pysideweakref.cpp b/libpyside/pysideweakref.cpp index eb4a6aa88..195206aa1 100644 --- a/libpyside/pysideweakref.cpp +++ b/libpyside/pysideweakref.cpp @@ -12,8 +12,7 @@ typedef struct { static PyObject* CallableObject_call(PyObject* callable_object, PyObject* args, PyObject* kw); static PyTypeObject PySideCallableObjectType = { - PyObject_HEAD_INIT(0) - 0, + PyVarObject_HEAD_INIT(0, 0) const_cast<char*>("PySide.Callable"), sizeof(PySideCallableObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -52,9 +51,9 @@ PyObject* create(PyObject* obj, PySideWeakRefFunction func, void* userData) if (obj == Py_None) return 0; - if (PySideCallableObjectType.ob_type == 0) + if (Py_TYPE(&PySideCallableObjectType) == 0) { - PySideCallableObjectType.ob_type = &PyType_Type; + Py_TYPE(&PySideCallableObjectType) = &PyType_Type; PyType_Ready(&PySideCallableObjectType); } |