diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-06-16 18:29:33 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-06-16 18:55:13 -0300 |
commit | 59af9acf0d9d12e34f97b7c6da4b2f4008ecceca (patch) | |
tree | 84f5b76fc7c2fb2b41deecbfa4c863e3ddaa2c58 /libshiboken/basewrapper.h | |
parent | 79c71a20c1e6d8830672b1c094ee132b99663de1 (diff) |
Fix bug#237 - "core dump when call wrong constructor inside of a class"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libshiboken/basewrapper.h')
-rw-r--r-- | libshiboken/basewrapper.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h index b6a9b7950..4031fb856 100644 --- a/libshiboken/basewrapper.h +++ b/libshiboken/basewrapper.h @@ -190,6 +190,11 @@ LIBSHIBOKEN_API bool setCppPointer(SbkBaseWrapper* wrapper, PyTypeObject* desire LIBSHIBOKEN_API void setTypeUserData(SbkBaseWrapper* wrapper, void* user_data, DeleteUserDataFunc d_func); LIBSHIBOKEN_API void* getTypeUserData(SbkBaseWrapper* wrapper); +/** +* Returns true if the constructor of \p ctorType can be called for a instance of type \p myType. +* \note This function set a python error when returning false. +*/ +LIBSHIBOKEN_API bool canCallConstructor(PyTypeObject* myType, PyTypeObject* ctorType); /** * Shiboken_TypeCheck macro performs a type check using the values registered with SbkType<>() template. |