summaryrefslogtreecommitdiffstats
path: root/headergenerator.cpp
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2009-09-22 17:36:00 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2009-09-22 17:51:57 -0300
commit6b9a6c30cb4899d7536dfae7e74413f7d6cf897b (patch)
tree69d2aaac53867c87e6ffcec91e71d50f6071b8bf /headergenerator.cpp
parent0581436081ef69ae62c51d4bb53c03cb9e6adefb (diff)
downloadshiboken-6b9a6c30cb4899d7536dfae7e74413f7d6cf897b.tar.gz
shiboken-6b9a6c30cb4899d7536dfae7e74413f7d6cf897b.tar.xz
shiboken-6b9a6c30cb4899d7536dfae7e74413f7d6cf897b.zip
Fix QTextCodec and QTextCodec::ConverterState generation:
- Fix function names containing "::" (such as QTextCodec); - Fix wrong method naming while generating CPython code; - Fix inner classes code generation.
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r--headergenerator.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp
index 1c262018..4bdad7b1 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -330,11 +330,6 @@ void HeaderGenerator::finishGeneration()
if (metaClass->typeEntry()->include().isValid())
s_cin << metaClass->typeEntry()->include().toString() << endl;
- foreach (AbstractMetaClass* innerClass, metaClass->innerClasses()) {
- if (shouldGenerate(innerClass))
- s_cin << innerClass->typeEntry()->include().toString() << endl;
- }
-
foreach (const AbstractMetaEnum* cppEnum, metaClass->enums()) {
writeTypeCheckMacro(s_pts, cppEnum->typeEntry());
s_pts << endl;
@@ -349,6 +344,17 @@ void HeaderGenerator::finishGeneration()
}
if (!metaClass->isNamespace()) {
+ foreach (AbstractMetaClass* innerClass, metaClass->innerClasses()) {
+ if (shouldGenerate(innerClass)) {
+ s_cin << innerClass->typeEntry()->include().toString() << endl;
+ s_pts << "PyAPI_FUNC(PyObject*) " << cpythonBaseName(innerClass->typeEntry());
+ s_pts << "_New(PyTypeObject* type, PyObject* args, PyObject* kwds);" << endl;
+ writeTypeCheckMacro(s_pts, innerClass->typeEntry());
+ writeTypeConverterDecl(convDecl, innerClass->typeEntry());
+ writeTypeConverterImpl(convImpl, innerClass->typeEntry());
+ convDecl << endl;
+ }
+ }
s_pts << "PyAPI_FUNC(PyObject*) " << cpythonBaseName(metaClass->typeEntry());
s_pts << "_New(PyTypeObject* type, PyObject* args, PyObject* kwds);" << endl;
writeTypeCheckMacro(s_pts, classType);