aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/sbkenum.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-09-15 15:26:40 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:14 -0300
commit6bf564204fe977dccf94ed58ddea7fd5eaf4a1fa (patch)
tree8b58405cdf2eb1c2dcd295540037c0896628da39 /libshiboken/sbkenum.h
parent24206196a34b4faeb4b720efcc84747f35accf94 (diff)
Using Py_TYPE macro instead of direct access to ob_type to work with Python 2.x and 3.x.
Enclosing PyCObject uses inside #ifdefs
Diffstat (limited to 'libshiboken/sbkenum.h')
-rw-r--r--libshiboken/sbkenum.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshiboken/sbkenum.h b/libshiboken/sbkenum.h
index 4fffd1bad..510ab6b87 100644
--- a/libshiboken/sbkenum.h
+++ b/libshiboken/sbkenum.h
@@ -39,7 +39,7 @@ namespace Shiboken
inline bool isShibokenEnum(PyObject* pyObj)
{
- return pyObj->ob_type->ob_type == &SbkEnumType_Type;
+ return Py_TYPE(pyObj->ob_type) == &SbkEnumType_Type;
}
namespace Enum