aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-23 14:41:06 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-23 15:31:52 -0300
commitfe8c88c03d24219c991ff6011b96ef51515ffe4d (patch)
tree8909033db0a3f74d8e8d1612697ea209cceac6ac /shibokengenerator.cpp
parent26d74212fcdb0167c71a24872434b3787f2d322d (diff)
- Fix method writeTypeCheck, so it finally correct decides when to use PyNumber_Check or a more specific type check function.
- Promote bool type as a specialization of int, as we do with float. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r--shibokengenerator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index e212eb85a..3d2799d0d 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -481,7 +481,7 @@ QString ShibokenGenerator::pythonPrimitiveTypeName(QString cppTypeName)
QString ShibokenGenerator::pythonPrimitiveTypeName(const PrimitiveTypeEntry* type)
{
- if (type->basicAliasedTypeEntry())
+ while (type->basicAliasedTypeEntry())
type = type->basicAliasedTypeEntry();
return pythonPrimitiveTypeName(type->name());
}
@@ -527,7 +527,8 @@ bool ShibokenGenerator::isNumber(QString cpythonApiName)
{
return cpythonApiName == "PyInt"
|| cpythonApiName == "PyFloat"
- || cpythonApiName == "PyLong";
+ || cpythonApiName == "PyLong"
+ || cpythonApiName == "PyBool";
}
bool ShibokenGenerator::isNumber(const TypeEntry* type)