summaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 21:16:40 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-12-02 17:26:02 -0200
commita5146ad246af19703671451451564e613e509463 (patch)
tree9b83014e1bac8a285ba555b5db8fbf1427edd426 /generator/cppgenerator.cpp
parent4954a2e8c95df27168b65519a8b61ce30b8ab0d6 (diff)
downloadshiboken-a5146ad246af19703671451451564e613e509463.tar.gz
shiboken-a5146ad246af19703671451451564e613e509463.tar.xz
shiboken-a5146ad246af19703671451451564e613e509463.zip
Remove cpp object copier as it was used by anyone and nobody missed him.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r--generator/cppgenerator.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 11135c82..199489dc 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -410,7 +410,6 @@ void CppGenerator::generateClass(QTextStream &s, const AbstractMetaClass *metaCl
if (!metaClass->typeEntry()->hashFunction().isEmpty())
writeHashFunction(s, metaClass);
- writeObjCopierFunction(s, metaClass);
writeClassDefinition(s, metaClass);
s << endl;
@@ -3265,10 +3264,6 @@ void CppGenerator::writeClassRegister(QTextStream& s, const AbstractMetaClass* m
s << INDENT << "Shiboken::ObjectType::setDestructorFunction(&" << cpythonTypeName(metaClass) << ", &Shiboken::callCppDestructor<" << dtorClassName << " >);" << endl;
}
- // Fill copy function
- if (metaClass->typeEntry()->isValue() && shouldGenerateCppWrapper(metaClass))
- s << INDENT << "Shiboken::ObjectType::setCopyFunction(&" << cpythonTypeName(metaClass) << ", &" << cpythonBaseName(metaClass) + "_ObjCopierFunc);" << endl;
-
s << INDENT << "if (PyType_Ready((PyTypeObject*)&" << pyTypeName << ") < 0)" << endl;
s << INDENT << INDENT << "return;" << endl << endl;
@@ -3869,17 +3864,6 @@ void CppGenerator::writeHashFunction(QTextStream& s, const AbstractMetaClass* me
s << '}' << endl << endl;
}
-void CppGenerator::writeObjCopierFunction(QTextStream& s, const AbstractMetaClass* metaClass)
-{
- if (!(metaClass->typeEntry()->isValue() && shouldGenerateCppWrapper(metaClass)))
- return;
- s << "static void* " << cpythonBaseName(metaClass) << "_ObjCopierFunc(const void* ptr)";
- s << '{' << endl;
- s << INDENT << "return new " << wrapperName(metaClass) << "(*reinterpret_cast<const " << metaClass->qualifiedCppName() << "*>(ptr));\n";
- s << '}' << endl << endl;
-
-}
-
void CppGenerator::writeStdListWrapperMethods(QTextStream& s, const AbstractMetaClass* metaClass)
{
//len