aboutsummaryrefslogtreecommitdiffstats
path: root/headergenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-06-07 18:48:49 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-06-09 14:16:16 -0300
commit4e58a45ea523118bef5e746edb7383c799d65a27 (patch)
tree87cc87a2b1d1b9831ac5fbcc79cad06e264d449b /headergenerator.cpp
parentb5e3a03a2f5907fb1cf6673dd0c2c29930f5eb64 (diff)
Added Converter<T>::checkType.
This method is needed because you can not call Converter<T>::isConvertible inside a Converter<Y>::isConvertible implementation, otherwise it'll create a 2-step implicit conversion.
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r--headergenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp
index d696b92cb..4543799e2 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -246,6 +246,7 @@ void HeaderGenerator::writeTypeConverterDecl(QTextStream& s, const TypeEntry* ty
s << INDENT << "static " << type->name() << " toCpp(PyObject* pyobj);" << endl;
s << INDENT << "static bool isConvertible(PyObject* pyobj);" << endl;
if (hasCustomConversion) {
+ s << INDENT << "static bool checkType(PyObject* pyobj);" << endl;
s << INDENT << "static inline PyObject* toPython(void* cppObj) { return toPython(*reinterpret_cast<"
<< type->name() << (isAbstractOrObjectType ? "" : "*") << " >(cppObj)); }" << endl;
s << INDENT << "static PyObject* toPython(const " << type->name() << "& cppObj);" << endl;