diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-12-01 21:16:40 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:08 -0300 |
commit | f8ad4eba987f53c05c42c2af6ec76bd59e196b75 (patch) | |
tree | 5f5cd67c7f3d14ac0c1dc6e83f20d8e803811ac5 /generator | |
parent | 766a0b55bff35c10463c4601f087d550fd0d9837 (diff) |
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')
-rw-r--r-- | generator/cppgenerator.cpp | 16 | ||||
-rw-r--r-- | generator/cppgenerator.h | 1 |
2 files changed, 0 insertions, 17 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index 013533e90..3be74c3e3 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; @@ -3263,10 +3262,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; @@ -3867,17 +3862,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 diff --git a/generator/cppgenerator.h b/generator/cppgenerator.h index 4374eb5e4..6e064dd4f 100644 --- a/generator/cppgenerator.h +++ b/generator/cppgenerator.h @@ -187,7 +187,6 @@ private: bool shouldGenerateGetSetList(const AbstractMetaClass* metaClass); void writeHashFunction(QTextStream& s, const AbstractMetaClass* metaClass); - void writeObjCopierFunction(QTextStream& s, const AbstractMetaClass* metaClass); // Write default implementations for sequence protocol void writeStdListWrapperMethods(QTextStream& s, const AbstractMetaClass* metaClass); |