diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 18:35:08 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 22:15:52 -0200 |
commit | cd2dceceefdb01781962be84768f0e0828dd956e (patch) | |
tree | b70475d44d31118680af76ecfc003174047a1921 /headergenerator.cpp | |
parent | 59bf883ba7a3678ad11e9eed7ddc93636b4c3424 (diff) |
Write cptr macro for inner classes.
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r-- | headergenerator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp index 322fb5c81..ce4542abf 100644 --- a/headergenerator.cpp +++ b/headergenerator.cpp @@ -241,6 +241,8 @@ void HeaderGenerator::finishGeneration() s_pts << getApiExportMacro() << " PyAPI_FUNC(PyObject*) " << cpythonBaseName(innerClass->typeEntry()); s_pts << "_New(Shiboken::SbkBaseWrapperType* type, PyObject* args, PyObject* kwds);" << endl; writeTypeCheckMacro(s_pts, innerClass->typeEntry()); + s_pts << "#define " << cpythonWrapperCPtr(innerClass, "pyobj") << " (("; + s_pts << innerClass->qualifiedCppName() << "*)SbkBaseWrapper_cptr(pyobj))" << endl << endl; writeTypeConverterDecl(convDecl, innerClass->typeEntry()); convDecl << endl; writeSbkTypeFunction(typeFunctions, innerClass); @@ -249,8 +251,8 @@ void HeaderGenerator::finishGeneration() s_pts << getApiExportMacro() << " PyAPI_FUNC(PyObject*) " << cpythonBaseName(metaClass->typeEntry()); s_pts << "_New(Shiboken::SbkBaseWrapperType* type, PyObject* args, PyObject* kwds);" << endl; writeTypeCheckMacro(s_pts, classType); - s_pts << "#define Sbk" << metaClass->name() << "_cptr(pyobj) (("; - s_pts << metaClass->name() << "*)SbkBaseWrapper_cptr(pyobj))" << endl << endl; + s_pts << "#define " << cpythonWrapperCPtr(metaClass, "pyobj") << " (("; + s_pts << metaClass->qualifiedCppName() << "*)SbkBaseWrapper_cptr(pyobj))" << endl << endl; writeTypeConverterDecl(convDecl, classType); convDecl << endl; } |