summaryrefslogtreecommitdiffstats
path: root/libshiboken/typeresolver.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 14:24:37 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 14:28:22 -0200
commitd117950aa36d409140296d7efdfbbfc928722e04 (patch)
tree99e6a1bd593e0f96752075b1cec8a957a974a5d5 /libshiboken/typeresolver.h
parent6d2e7d8a5cd7fea0507309107c8b306a44ef2ce0 (diff)
downloadshiboken-d117950aa36d409140296d7efdfbbfc928722e04.tar.gz
shiboken-d117950aa36d409140296d7efdfbbfc928722e04.tar.xz
shiboken-d117950aa36d409140296d7efdfbbfc928722e04.zip
Remove objectDeleter function and use the well known Shiboken::callCppDestructor.
Diffstat (limited to 'libshiboken/typeresolver.h')
-rw-r--r--libshiboken/typeresolver.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/libshiboken/typeresolver.h b/libshiboken/typeresolver.h
index f959010f..6a3750c1 100644
--- a/libshiboken/typeresolver.h
+++ b/libshiboken/typeresolver.h
@@ -48,12 +48,6 @@ inline void* pythonToObjectType(PyObject* pyobj, void** data, bool)
}
template <typename T>
-inline void objectDeleter(void* data)
-{
- delete reinterpret_cast<T*>(data);
-}
-
-template <typename T>
inline PyObject* objectTypeToPython(void* cptr)
{
return Shiboken::Converter<T*>::toPython(*reinterpret_cast<T**>(cptr));
@@ -84,7 +78,7 @@ public:
template<typename T>
static TypeResolver* createValueTypeResolver(const char* typeName)
{
- return new TypeResolver(typeName, &Shiboken::Converter<T>::toPython, &pythonToValueType<T>, SbkType<T>(), &objectDeleter<T>);
+ return new TypeResolver(typeName, &Shiboken::Converter<T>::toPython, &pythonToValueType<T>, SbkType<T>(), &callCppDestructor<T>);
}
template<typename T>