summaryrefslogtreecommitdiffstats
path: root/libshiboken/sbkconverter.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-10-17 20:06:04 -0200
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 20:28:07 -0300
commitc392df67c0a668148294b0ac0a7c026d29da9112 (patch)
treec38ae3bc7190072e82e20950b21f269ba93a266c /libshiboken/sbkconverter.h
parent1588c124fb818a6edd54491bcfbecebbb9b7869b (diff)
downloadshiboken-c392df67c0a668148294b0ac0a7c026d29da9112.tar.gz
shiboken-c392df67c0a668148294b0ac0a7c026d29da9112.tar.xz
shiboken-c392df67c0a668148294b0ac0a7c026d29da9112.zip
Added SBK_CONVERTER, a macro to get the type converter whatever the type, but primitive types.
Diffstat (limited to 'libshiboken/sbkconverter.h')
-rw-r--r--libshiboken/sbkconverter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libshiboken/sbkconverter.h b/libshiboken/sbkconverter.h
index a91d14e6..0edd5abb 100644
--- a/libshiboken/sbkconverter.h
+++ b/libshiboken/sbkconverter.h
@@ -242,7 +242,6 @@ LIBSHIBOKEN_API bool checkDictTypes(PyTypeObject* keyType, PyTypeObject* valueTy
/// Returns true if a Python dictionary can be converted to a C++ hash or map.
LIBSHIBOKEN_API bool convertibleDictTypes(SbkConverter* keyConverter, bool keyCheckExact, SbkConverter* valueConverter, bool valueCheckExact, PyObject* pyIn);
-
#define SBK_PY_LONG_LONG_IDX 0
#define SBK_BOOL_IDX 1
#define SBK_CHAR_IDX 2
@@ -283,4 +282,7 @@ template<> inline SbkConverter* PrimitiveTypeConverter<void*>() { return primiti
} } // namespace Shiboken::Conversions
+struct _SbkGenericType { PyHeapTypeObject super; SbkConverter* converter; };
+#define SBK_CONVERTER(objType) (reinterpret_cast<_SbkGenericType*>(objType)->converter)
+
#endif // SBK_CONVERTER_H