summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-19 16:09:42 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-19 16:31:11 -0200
commitdc5e4520f3551c3d0aff0383f4a199541d83c772 (patch)
treed5a63c449ddfd98f1567339e3c09faee1ced978c
parent2106919936da6d34a1319ad20e283f8cf8fffbce (diff)
downloadshiboken-dc5e4520f3551c3d0aff0383f4a199541d83c772.tar.gz
shiboken-dc5e4520f3551c3d0aff0383f4a199541d83c772.tar.xz
shiboken-dc5e4520f3551c3d0aff0383f4a199541d83c772.zip
Fix check of return type by python reimplementations of C++ virtual functions.
Use isConvertible function instead of checkType when checking the return value of virtual functions returned by python reimplementations when the return value had their type changed by the typesystem. Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--generator/cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index e031f39a..7160de04 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -682,7 +682,7 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
desiredType = "SbkType<" + typeName + " >()->tp_name";
}
} else {
- s << guessCPythonCheckFunction(func->typeReplaced(0));
+ s << guessCPythonIsConvertible(func->typeReplaced(0));
desiredType = '"' + func->typeReplaced(0) + '"';
}
s << "(" PYTHON_RETURN_VAR ");" << endl;