aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-16 13:50:45 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-18 19:45:07 -0300
commit12a36f7c83326c22b46cbc4d6ce7c76c545826a7 (patch)
tree66b321fed53839c21d4719ad84166cb81f8222a7 /libshiboken/conversions.h
parent94e1c785c8d6f3dca195f1005fe0c3ee0f02ead5 (diff)
Add a default implementation for SbkType, so not binded types will return a null pointer.
Pro: Will be possible to write template functions to handle sequence conversions. Cons: We will not have an unresolved symbol when an error occur on generator.
Diffstat (limited to 'libshiboken/conversions.h')
-rw-r--r--libshiboken/conversions.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index c9fe46e8b..110d49857 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -58,7 +58,10 @@ namespace Shiboken
* \see SpecialCastFunction
*/
template<typename T>
-PyTypeObject* SbkType();
+PyTypeObject* SbkType()
+{
+ return 0;
+}
template<> inline PyTypeObject* SbkType<int>() { return &PyInt_Type; }
template<> inline PyTypeObject* SbkType<unsigned int>() { return &PyLong_Type; }