diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-07-02 14:06:17 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-07-05 17:40:17 -0300 |
commit | 8a6790433c874ff6882c7c191582b66e092ae6c5 (patch) | |
tree | 14047f74280cb1efa2735aaa1d307fa6eeacf695 | |
parent | 95b44627e2080c25a6fba858b18a68727c064d16 (diff) |
Store class orignal name to future use.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente <hugo.lima@openbossa.org>
-rw-r--r-- | cppgenerator.cpp | 4 | ||||
-rw-r--r-- | libshiboken/basewrapper.cpp | 1 | ||||
-rw-r--r-- | libshiboken/basewrapper.h | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 1dd61e096..3abee0234 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -2356,7 +2356,9 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass* s << INDENT << "/*ext_tocpp*/ 0," << endl; s << INDENT << "/*cpp_dtor*/ " << cpp_dtor << ',' << endl; s << INDENT << "/*is_multicpp*/ 0," << endl; - s << INDENT << "/*is_user_type*/ 0" << endl; + s << INDENT << "/*is_user_type*/ 0," << endl; + s << INDENT << "/*original_name*/ \"" << metaClass->qualifiedCppName() << "\"," << endl; + s << INDENT << "/*user_data*/ 0" << endl; s << "};" << endl; s << "} //extern" << endl; } diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index cc3a70a61..eaa6a2aae 100644 --- a/libshiboken/basewrapper.cpp +++ b/libshiboken/basewrapper.cpp @@ -517,6 +517,7 @@ PyObject* SbkBaseWrapperType_TpNew(PyTypeObject* metatype, PyObject* args, PyObj newType->cpp_dtor = 0; newType->is_multicpp = 1; } + newType->original_name = ""; newType->user_data = 0; newType->d_func = 0; newType->is_user_type = 1; diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h index 4031fb856..d5a23939c 100644 --- a/libshiboken/basewrapper.h +++ b/libshiboken/basewrapper.h @@ -102,6 +102,8 @@ struct LIBSHIBOKEN_API SbkBaseWrapperType int is_multicpp:1; /// True if this type was definied by the user. int is_user_type:1; + /// C++ name + const char* original_name; /// Type user data void *user_data; DeleteUserDataFunc d_func; |