summaryrefslogtreecommitdiffstats
path: root/libshiboken/typeresolver.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 14:27:39 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-12-01 14:29:35 -0200
commitaebf1341686e1a694a5ad9b24e384ee494683af8 (patch)
tree3712cb8e08edb590adbc604e50bd6e317461ae9b /libshiboken/typeresolver.h
parentd117950aa36d409140296d7efdfbbfc928722e04 (diff)
downloadshiboken-aebf1341686e1a694a5ad9b24e384ee494683af8.tar.gz
shiboken-aebf1341686e1a694a5ad9b24e384ee494683af8.tar.xz
shiboken-aebf1341686e1a694a5ad9b24e384ee494683af8.zip
Remove SbkTypeInfo and CppObjectCopier structs, they aren't needed after the fix on qt_metacall.
Diffstat (limited to 'libshiboken/typeresolver.h')
-rw-r--r--libshiboken/typeresolver.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/libshiboken/typeresolver.h b/libshiboken/typeresolver.h
index 6a3750c1..d53d313f 100644
--- a/libshiboken/typeresolver.h
+++ b/libshiboken/typeresolver.h
@@ -31,20 +31,15 @@ namespace Shiboken
/* To C++ convertion functions. */
template <typename T>
-inline void* pythonToValueType(PyObject* pyobj, void** data, bool alloc)
+inline void pythonToValueType(PyObject* pyobj, void** data)
{
- if (alloc)
- *data = Shiboken::CppObjectCopier<T>::copy(Shiboken::Converter<T>::toCpp(pyobj));
-
- *reinterpret_cast< T*>(*data) = Shiboken::Converter<T>::toCpp(pyobj);
- return *data;
+ *reinterpret_cast<T*>(*data) = Shiboken::Converter<T>::toCpp(pyobj);
}
template <typename T>
-inline void* pythonToObjectType(PyObject* pyobj, void** data, bool)
+inline void pythonToObjectType(PyObject* pyobj, void** data)
{
- *data = Shiboken::Converter<T*>::toCpp(pyobj);
- return *data;
+ *reinterpret_cast<T**>(*data) = Shiboken::Converter<T*>::toCpp(pyobj);
}
template <typename T>
@@ -70,7 +65,7 @@ public:
};
typedef PyObject* (*CppToPythonFunc)(void*);
- typedef void* (*PythonToCppFunc)(PyObject*, void**, bool);
+ typedef void (*PythonToCppFunc)(PyObject*, void**);
typedef void (*DeleteObjectFunc)(void*);
~TypeResolver();
@@ -92,7 +87,7 @@ public:
const char* typeName() const;
PyObject* toPython(void* cppObj);
- void* toCpp(PyObject* pyObj, void** place, bool alloc=false);
+ void toCpp(PyObject* pyObj, void** place);
void deleteObject(void* object);
PyTypeObject* pythonType();