diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-09-16 14:29:25 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:14 -0300 |
commit | 4e17f2620f10677e09b9cb93c7ba8efa703b158b (patch) | |
tree | 7ffe0300a6c3166ebf0dca76c7ff9876ef9cbedc /shibokenmodule/typesystem_shiboken.xml | |
parent | c686942f6efbac4ac43cf859bfdd2c7209b783ea (diff) |
Revert "Implements PSEP-0106 and fixes bug 902 - "Expose Shiboken functionality through a Python module"."
This reverts commit bc8448d7fb91733ff08c2a6a3a878702c14a24e0.
The PSEP didn't reach the final version yet, so this commit can't be released.
Diffstat (limited to 'shibokenmodule/typesystem_shiboken.xml')
-rw-r--r-- | shibokenmodule/typesystem_shiboken.xml | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/shibokenmodule/typesystem_shiboken.xml b/shibokenmodule/typesystem_shiboken.xml deleted file mode 100644 index 20ca22031..000000000 --- a/shibokenmodule/typesystem_shiboken.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" ?> -<typesystem package="shiboken"> - <primitive-type name="bool" /> - <primitive-type name="unsigned long" /> - <add-function signature="isValid(PyObject*)" return-type="bool"> - <inject-code> - %PYARG_0 = %CONVERTTOPYTHON[bool](Shiboken::Object::isValid(%1, false)); - </inject-code> - </add-function> - - <add-function signature="wrapInstance(unsigned long, PyType)" return-type="PyObject*"> - <inject-code> - if (Shiboken::ObjectType::checkType((PyTypeObject*)%2)) - %PYARG_0 = Shiboken::Object::newObject((SbkObjectType*)%2, (void*)%1, false, true); - else - PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); - </inject-code> - </add-function> - - <add-function signature="getCppPointer(PyObject*)" return-type="PyObject*"> - <inject-code> - if (Shiboken::Object::checkType(%1)) { - std::vector<void*> ptrs = Shiboken::Object::cppPointers((SbkObject*)%1); - %PYARG_0 = PyTuple_New(ptrs.size()); - for (std::size_t i = 0; i < ptrs.size(); ++i) - PyTuple_SET_ITEM(%PYARG_0, i, PyLong_FromVoidPtr(ptrs[i])); - } else { - PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); - } - </inject-code> - </add-function> - - <add-function signature="delete(PyObject*)"> - <inject-code> - if (Shiboken::Object::checkType(%1)) { - Shiboken::Object::callCppDestructors((SbkObject*)%1); - } else { - PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); - } - </inject-code> - </add-function> - - <add-function signature="isOwnedByPython(PyObject*)" return-type="bool"> - <inject-code> - if (Shiboken::Object::checkType(%1)) { - %PYARG_0 = %CONVERTTOPYTHON[bool](Shiboken::Object::hasOwnership((SbkObject*)%1)); - } else { - PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); - } - </inject-code> - </add-function> - - <add-function signature="wasCreatedByPython(PyObject*)" return-type="bool"> - <inject-code> - if (Shiboken::Object::checkType(%1)) { - %PYARG_0 = %CONVERTTOPYTHON[bool](Shiboken::Object::wasCreatedByPython((SbkObject*)%1)); - } else { - PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); - } - </inject-code> - </add-function> - - <add-function signature="dump(PyObject*)" return-type="PyObject*"> - <inject-code> - if (!Shiboken::Object::checkType(%1)) { - %PYARG_0 = PyString_FromString("Ordinary Python type."); - } else { - std::string str = Shiboken::Object::info((SbkObject*)%1); - %PYARG_0 = PyString_FromString(str.c_str()); - } - </inject-code> - </add-function> -</typesystem> |