aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-01 18:52:00 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:07:20 -0300
commitdadcc2efac417680073cae92c1ca64580af7d327 (patch)
tree0c0e7a3c306bc677bee3845ddc71a40d991057e3 /generator
parent6d660aee32805af4af23d17381398c3f3503c7cf (diff)
Fix function name use on toPytho fucion.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 1c3201847..6d7008def 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$"), "");