diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-08 11:59:57 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-08 12:09:49 -0300 |
commit | f38e34a3a987f15e947d45efb0ef7ffeb7f3275e (patch) | |
tree | 4908d7da9ea33cb6e19378633e0a401b57c0ef65 /headergenerator.cpp | |
parent | dc1ca0f9a9aa216973a6ab1f458f0f965033530d (diff) |
Renamed a lot of Shiboken things with "Py" prefix to use "Sbk" prefix.
To avoid confusion of Python stuff with Shiboken generated stuff.
For example: a C++ class called "String" would have the PyString_Type
wrapper generated for it, mixing with the proper Python PyString_Type;
now the generate code will have things like SbkString_Type, SbkString_New,
SbkString_someMethod, and so on.
PyBaseWrapper and its variants were renamed to SbkBaseWrapper.
PyType<T>() is now SbkType<T>()
PyEnumObject was renamed to SbkEnumObject.
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r-- | headergenerator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp index 69681c45e..fe35eb445 100644 --- a/headergenerator.cpp +++ b/headergenerator.cpp @@ -246,8 +246,8 @@ void HeaderGenerator::finishGeneration() s_pts << "PyAPI_FUNC(PyObject*) " << cpythonBaseName(metaClass->typeEntry()); s_pts << "_New(PyTypeObject* type, PyObject* args, PyObject* kwds);" << endl; writeTypeCheckMacro(s_pts, classType); - s_pts << "#define Py" << metaClass->name() << "_cptr(pyobj) (("; - s_pts << metaClass->name() << "*)PyBaseWrapper_cptr(pyobj))" << endl << endl; + s_pts << "#define Sbk" << metaClass->name() << "_cptr(pyobj) (("; + s_pts << metaClass->name() << "*)SbkBaseWrapper_cptr(pyobj))" << endl << endl; writeTypeConverterDecl(convDecl, classType); convDecl << endl; } @@ -353,18 +353,18 @@ void HeaderGenerator::writePyTypeFunction(QTextStream& s, const AbstractMetaEnum QString enumPrefix; if (cppEnum->enclosingClass()) enumPrefix = cppEnum->enclosingClass()->qualifiedCppName() + "::"; - s << "template<>\ninline PyTypeObject* PyType<" << enumPrefix << cppEnum->name() << " >() " + s << "template<>\ninline PyTypeObject* SbkType<" << enumPrefix << cppEnum->name() << " >() " << "{ return &" << cpythonTypeName(cppEnum->typeEntry()) << "; }\n"; FlagsTypeEntry* flag = cppEnum->typeEntry()->flags(); if (flag) { - s << "template<>\ninline PyTypeObject* PyType<" << flag->name() << " >() " + s << "template<>\ninline PyTypeObject* SbkType<" << flag->name() << " >() " << "{ return &" << cpythonTypeName(flag) << "; }\n"; } } void HeaderGenerator::writePyTypeFunction(QTextStream& s, const AbstractMetaClass* cppClass) { - s << "template<>\ninline PyTypeObject* PyType<" << cppClass->qualifiedCppName() << " >() " + s << "template<>\ninline PyTypeObject* SbkType<" << cppClass->qualifiedCppName() << " >() " << "{ return reinterpret_cast<PyTypeObject*>(&" << cpythonTypeName(cppClass) << "); }\n"; } |