summaryrefslogtreecommitdiffstats
path: root/headergenerator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-15 13:47:06 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-15 13:52:06 -0300
commit7f55b8c2f579753ffaff6ef4d75e0dbc7fd9da34 (patch)
treee767348ea6a46c9bf17c46aada0f072a4e5dbb4d /headergenerator.cpp
parent1d811177537207ff0df63985ca4e071c8908a630 (diff)
downloadshiboken-7f55b8c2f579753ffaff6ef4d75e0dbc7fd9da34.tar.gz
shiboken-7f55b8c2f579753ffaff6ef4d75e0dbc7fd9da34.tar.xz
shiboken-7f55b8c2f579753ffaff6ef4d75e0dbc7fd9da34.zip
Removed useless ValueHolder template.
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r--headergenerator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp
index 14f282dd..1619209e 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -188,7 +188,7 @@ void HeaderGenerator::writeTypeConverterDecl(QTextStream& s, const TypeEntry* ty
s << "template<>" << endl;
s << "struct Converter< " << cppName << " >" << endl << '{' << endl;
- s << INDENT << "static PyObject* toPython(ValueHolder< " << cppName << " > cppobj);" << endl;
+ s << INDENT << "static PyObject* toPython(" << cppName << " cppobj);" << endl;
s << INDENT << "static " << cppName << " toCpp(PyObject* pyobj);" << endl;
s << "};" << endl;
}
@@ -200,28 +200,28 @@ void HeaderGenerator::writeTypeConverterImpl(QTextStream& s, const TypeEntry* ty
if (type->isObject())
cppName.append('*');
- s << "inline PyObject* Converter< " << cppName << " >::toPython(ValueHolder< " << cppName << " > cppobj)" << endl;
+ s << "inline PyObject* Converter< " << cppName << " >::toPython(" << cppName << " cppobj)" << endl;
s << '{' << endl;
s << INDENT << "PyObject* pyobj;" << endl;
if (!type->isEnum()) {
- s << INDENT << "ValueHolder<void*> holder((void*) ";
+ s << INDENT << "void* holder = (void*) ";
if (type->isValue())
- s << "new " << cppName << "(cppobj.value)";
+ s << "new " << cppName << "(cppobj)";
else
- s << "cppobj.value";
- s << ");" << endl;
+ s << "cppobj";
+ s << ";" << endl;
}
s << INDENT << "pyobj = ";
if (type->isEnum()) {
s << "Shiboken::PyEnumObject_New(&" << pyTypeName << ',' << endl;
- s << INDENT << INDENT << "\"ReturnedValue\", (long) cppobj.value);" << endl;
+ s << INDENT << INDENT << "\"ReturnedValue\", (long) cppobj);" << endl;
} else {
QString newWrapper = QString("Shiboken::PyBaseWrapper_New(&")
+ pyTypeName + ", &" + pyTypeName
- + ", holder.value);";
+ + ", holder);";
if (type->isValue()) {
s << newWrapper << endl;
} else {