diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-10 15:30:08 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:08:57 -0300 |
commit | 43c16539246a1ac6abc12b141ab32b5932e8c51e (patch) | |
tree | d70519cad37b4c1289131fbc265dd07c932bd955 /libshiboken | |
parent | 899f9c2ccfc6967867f6d5f1cad925011a2f756b (diff) |
Remove macro Shiboken_TypeCheck
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/basewrapper.h | 5 | ||||
-rw-r--r-- | libshiboken/conversions.h | 4 |
2 files changed, 1 insertions, 8 deletions
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h index 40d7b22e4..aeed89178 100644 --- a/libshiboken/basewrapper.h +++ b/libshiboken/basewrapper.h @@ -162,11 +162,6 @@ LIBSHIBOKEN_API void* getTypeUserData(SbkObject* wrapper); LIBSHIBOKEN_API bool canCallConstructor(PyTypeObject* myType, PyTypeObject* ctorType); /** - * Shiboken_TypeCheck macro performs a type check using the values registered with SbkType<>() template. - */ -#define Shiboken_TypeCheck(pyobj, type) (PyObject_TypeCheck(pyobj, SbkType<type>())) - -/** * Increments the reference count of the referred Python object. * A previous Python object in the same position identified by the 'key' parameter * will have its reference counter decremented automatically when replaced. diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index dff144782..c52e1e4a8 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -149,12 +149,10 @@ struct Converter<T*> static T* toCpp(PyObject* pyobj) { - if (Shiboken_TypeCheck(pyobj, T)) + if (PyObject_TypeCheck(pyobj, SbkType<T>())) return (T*) Wrapper::cppPointer(pyobj, SbkType<T>()); - else if (Converter<T>::isConvertible(pyobj)) return CppObjectCopier<T>::copy(Converter<T>::toCpp(pyobj)); - else if (pyobj == Py_None) return 0; |