diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-14 16:02:31 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-14 16:40:55 -0200 |
commit | 8657f7eff10c27bf450bb742e377144d2a08019f (patch) | |
tree | 4cbf834b1199aa76f5d31f67a8a7031658b1b18b /shibokengenerator.cpp | |
parent | 370a3b6cf2a57bf63c1d4041a0de5085485b37fe (diff) |
Changed prefix of local generated C functions to avoid name clash with bindinded method names.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r-- | shibokengenerator.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp index 01b34d41c..5c8342fe9 100644 --- a/shibokengenerator.cpp +++ b/shibokengenerator.cpp @@ -197,13 +197,15 @@ QString ShibokenGenerator::cpythonFunctionName(const AbstractMetaFunction* func) if (func->ownerClass()) { result = cpythonBaseName(func->ownerClass()->typeEntry()); - result += '_'; - if (func->isConstructor() || func->isCopyConstructor()) - result += "Init"; - else if (func->isOperatorOverload()) - result += ShibokenGenerator::pythonOperatorFunctionName(func); - else - result += func->name(); + if (func->isConstructor() || func->isCopyConstructor()) { + result += "_Init"; + } else { + result += "Func_"; + if (func->isOperatorOverload()) + result += ShibokenGenerator::pythonOperatorFunctionName(func); + else + result += func->name(); + } } else { result = "Sbk" + moduleName() + "Module_" + func->name(); } |