summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-01 18:52:00 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-01 19:42:56 -0300
commitebeaeff37cf52abbc2beed11b27949cc4d632a53 (patch)
treec684976a8ff2144b70ce908e48d3505ec309e3d1
parentdc044d7fa9dccd444c4998b2c260a3f2ab54644f (diff)
downloadshiboken-ebeaeff37cf52abbc2beed11b27949cc4d632a53.tar.gz
shiboken-ebeaeff37cf52abbc2beed11b27949cc4d632a53.tar.xz
shiboken-ebeaeff37cf52abbc2beed11b27949cc4d632a53.zip
Fix function name use on toPytho fucion.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--generator/cppgenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 1c320184..6d7008de 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -125,7 +125,7 @@ QList<AbstractMetaFunctionList> CppGenerator::filterGroupedOperatorFunctions(con
void CppGenerator::writeToPythonFunction(QTextStream& s, const AbstractMetaClass* metaClass)
{
- s << "PyObject* SbkToPythonFunc(PyObject* self)" << endl;
+ s << "static PyObject* " << cpythonBaseName(metaClass) << "_ToPythonFunc(PyObject* self)" << endl;
s << "{" << endl;
s << INDENT << metaClass->qualifiedCppName() << "* cppSelf = Shiboken::Converter<" << metaClass->qualifiedCppName() << "* >::toCpp(self);" << endl;
s << INDENT << "PyObject* pyResult = Shiboken::PythonConverter<" << metaClass->qualifiedCppName() << " >::transformToPython(cppSelf);" << endl;
@@ -315,7 +315,7 @@ void CppGenerator::generateClass(QTextStream &s, const AbstractMetaClass *metaCl
//ToPython used by Python Conversion
if (metaClass->typeEntry()->hasTargetConversionRule()) {
writeToPythonFunction(s, metaClass);
- md << INDENT << "{\"toPython\", (PyCFunction)SbkToPythonFunc, METH_NOARGS}," << endl;
+ md << INDENT << "{\"toPython\", (PyCFunction)" << cpythonBaseName(metaClass) << "_ToPythonFunc, METH_NOARGS}," << endl;
}
QString className = cpythonTypeName(metaClass).replace(QRegExp("_Type$"), "");