diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-11-15 18:28:53 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-12-09 20:28:08 -0300 |
commit | 59b142c50ab40021071d733d9c3b06696b7d5f08 (patch) | |
tree | 3b94a7150b014fbc20fa31705ce7785061b075f0 | |
parent | d25db2975162f592892313e10938531d8505e6c4 (diff) | |
download | shiboken-59b142c50ab40021071d733d9c3b06696b7d5f08.tar.gz shiboken-59b142c50ab40021071d733d9c3b06696b7d5f08.tar.xz shiboken-59b142c50ab40021071d733d9c3b06696b7d5f08.zip |
Added a convenience method to check if a converter belongs to a wrapper type.
-rw-r--r-- | libshiboken/sbkconverter.cpp | 5 | ||||
-rw-r--r-- | libshiboken/sbkconverter.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libshiboken/sbkconverter.cpp b/libshiboken/sbkconverter.cpp index edd7097d..6506d6e5 100644 --- a/libshiboken/sbkconverter.cpp +++ b/libshiboken/sbkconverter.cpp @@ -474,6 +474,11 @@ bool pythonTypeIsObjectType(SbkConverter* converter) return converter->pointerToPython && !converter->copyToPython; } +bool pythonTypeIsWrapperType(SbkConverter* converter) +{ + return converter->pointerToPython; +} + SpecificConverter::SpecificConverter(const char* typeName) : m_type(InvalidConversion) { diff --git a/libshiboken/sbkconverter.h b/libshiboken/sbkconverter.h index 41126786..e0768d63 100644 --- a/libshiboken/sbkconverter.h +++ b/libshiboken/sbkconverter.h @@ -291,6 +291,9 @@ LIBSHIBOKEN_API bool pythonTypeIsValueType(SbkConverter* converter); /// Returns true if the Python type associated with the converter is an object type. LIBSHIBOKEN_API bool pythonTypeIsObjectType(SbkConverter* converter); +/// Returns true if the Python type associated with the converter is a wrapper type. +LIBSHIBOKEN_API bool pythonTypeIsWrapperType(SbkConverter* converter); + #define SBK_PY_LONG_LONG_IDX 0 #define SBK_BOOL_IDX 1 #define SBK_CHAR_IDX 2 |