summaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/conversions.h')
-rw-r--r--libshiboken/conversions.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index d4059b56..67e62792 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -491,11 +491,11 @@ struct EnumConverter
static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast<CppEnum*>(cppobj)); }
static inline PyObject* toPython(CppEnum cppenum)
{
- return SbkEnumObject_New(SbkType<CppEnum>(), (long) cppenum);
+ return Shiboken::Enum::newItem(Shiboken::SbkType<CppEnum>(), (long) cppenum);
}
- static inline CppEnum toCpp(PyObject* pyobj)
+ static inline CppEnum toCpp(PyObject* pyObj)
{
- return (CppEnum) reinterpret_cast<SbkEnumObject*>(pyobj)->ob_ival;
+ return (CppEnum) Shiboken::Enum::getValue(pyObj);;
}
};