diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 21:19:50 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 22:15:53 -0200 |
commit | 2d462f1397e87ee929b795ba896ca3d5344c2583 (patch) | |
tree | a2f8d42bb0cbed58fe28517e7159081d371817e9 | |
parent | df3b7134e1ff05fde57e8e3f74835131e34110d4 (diff) |
Use qualified C++ names to generate "init" functions.
-rw-r--r-- | cppgenerator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index eda2e18fc..fad7d4024 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -2200,7 +2200,7 @@ void CppGenerator::writeClassRegister(QTextStream& s, const AbstractMetaClass* m { QString pyTypeName = cpythonTypeName(metaClass); s << "PyAPI_FUNC(void)" << endl; - s << "init_" << metaClass->name().toLower() << "(PyObject* module)" << endl; + s << "init_" << metaClass->qualifiedCppName().replace("::", "_") << "(PyObject* module)" << endl; s << '{' << endl; // class inject-code target/beginning @@ -2423,9 +2423,9 @@ void CppGenerator::finishGeneration() continue; s_classInitDecl << "extern \"C\" PyAPI_FUNC(void) init_" - << cls->name().toLower() << "(PyObject* module);" << endl; + << cls->qualifiedCppName().replace("::", "_") << "(PyObject* module);" << endl; - QString defineStr = "init_" + cls->name().toLower() + "(module);"; + QString defineStr = "init_" + cls->qualifiedCppName().replace("::", "_") + "(module);"; if (cls->isNamespace()) s_namespaceDefines << INDENT << defineStr << endl; else |