summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 04:11:29 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 04:11:29 -0300
commitf3973ab15e3a71044d4cbcc2a982a09d739c6c72 (patch)
tree70a5f6c3eca0811afbcde9812251e72346453dc1
parent838b56730d27a6fd5e229c103f1d9957c58c5b0d (diff)
Generator uses PySequence functions instead of PyTuple or PyList ones
-rw-r--r--cppgenerator.cpp2
-rw-r--r--shibokengenerator.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index a0de62bb..2d25d2ad 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -715,7 +715,7 @@ void CppGenerator::writePolymorphicDecisor(QTextStream& s, PolymorphicData* pare
if (polymorphicData->argType()->isContainer() &&
((ContainerTypeEntry*)polymorphicData->argType()->typeEntry())->type()
== ContainerTypeEntry::PairContainer) {
- s << " && PyTuple_GET_SIZE(" << pyArgName << ") == 2";
+ s << " && PySequence_Size(" << pyArgName << ") == 2";
}
if (signatureFound && varargs) {
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index c3779172..27e9f0f6 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -317,10 +317,11 @@ QString ShibokenGenerator::cpythonBaseName(const TypeEntry* type)
case ContainerTypeEntry::VectorContainer:
case ContainerTypeEntry::StackContainer:
case ContainerTypeEntry::QueueContainer:
- baseName = "PyList";
- break;
+ //baseName = "PyList";
+ //break;
case ContainerTypeEntry::PairContainer:
- baseName = "PyTuple";
+ //baseName = "PyTuple";
+ baseName = "PySequence";
break;
case ContainerTypeEntry::SetContainer:
baseName = "PySet";