@@ -125,9 +125,9 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla | |||||
125 | AbstractMetaArgumentList args = fun->arguments(); |
|
125 | AbstractMetaArgumentList args = fun->arguments(); | |
126 |
|
126 | |||
127 | s << "if (_wrapper) {" << endl; |
|
127 | s << "if (_wrapper) {" << endl; | |
128 |
s << " PyObject* |
|
128 | s << " static PyObject* name = PyString_FromString(\"" << fun->name() << "\");" << endl; | |
129 | s << " PyErr_Clear();" << endl; |
|
129 | s << " PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name);" << endl; | |
130 |
s << " if (obj |
|
130 | s << " if (obj) {" << endl; | |
131 | s << " static const char* argumentList[] ={\""; |
|
131 | s << " static const char* argumentList[] ={\""; | |
132 | if (hasReturnValue) { |
|
132 | if (hasReturnValue) { | |
133 | // write the arguments, return type first |
|
133 | // write the arguments, return type first | |
@@ -176,6 +176,8 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla | |||||
176 | } else { |
|
176 | } else { | |
177 | s << " return;" << endl; |
|
177 | s << " return;" << endl; | |
178 | } |
|
178 | } | |
|
179 | s << " } else {" << endl; | |||
|
180 | s << " PyErr_Clear();" << endl; | |||
179 | s << " }" << endl; |
|
181 | s << " }" << endl; | |
180 | s << "}" << endl; |
|
182 | s << "}" << endl; | |
181 |
|
183 |
General Comments 0
You need to be logged in to leave comments.
Login now