diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-12-11 23:13:29 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:34 -0300 |
commit | bebb9009a1f400fae548ba2a6e0553fc2643c6e2 (patch) | |
tree | 26f49d5e702af121b838b533275c99b20a2c0e4e /tests/minimalbinding | |
parent | fb37b84fa723af8fa911910932090b6569589e0f (diff) |
Removed the last pieces of code generation that uses the old template Converters.
Diffstat (limited to 'tests/minimalbinding')
-rw-r--r-- | tests/minimalbinding/list_conversions.h | 4 | ||||
-rw-r--r-- | tests/minimalbinding/minbool_conversions.h | 10 | ||||
-rw-r--r-- | tests/minimalbinding/typesystem_minimal.xml | 4 |
3 files changed, 2 insertions, 16 deletions
diff --git a/tests/minimalbinding/list_conversions.h b/tests/minimalbinding/list_conversions.h deleted file mode 100644 index 6ed8d9647..000000000 --- a/tests/minimalbinding/list_conversions.h +++ /dev/null @@ -1,4 +0,0 @@ -namespace Shiboken { -template<typename T> -struct Converter<std::list<T> > : StdListConverter<std::list<T> > {}; -} diff --git a/tests/minimalbinding/minbool_conversions.h b/tests/minimalbinding/minbool_conversions.h deleted file mode 100644 index f343a4711..000000000 --- a/tests/minimalbinding/minbool_conversions.h +++ /dev/null @@ -1,10 +0,0 @@ -namespace Shiboken { -template <> -struct Converter<MinBool> : public ValueTypeConverter<MinBool> -{ - static bool isConvertible(PyObject* pyObj) { return PyBool_Check(pyObj); } - using ValueTypeConverter<MinBool>::toPython; - static PyObject* toPython(const MinBool& holder) { return PyBool_FromLong(holder.value()); } - static MinBool toCpp(PyObject* pyobj) { return MinBool(pyobj == Py_True); } -}; -} diff --git a/tests/minimalbinding/typesystem_minimal.xml b/tests/minimalbinding/typesystem_minimal.xml index 7f1523b73..be52d191c 100644 --- a/tests/minimalbinding/typesystem_minimal.xml +++ b/tests/minimalbinding/typesystem_minimal.xml @@ -5,7 +5,7 @@ <primitive-type name="MinBool" target-lang-api-name="PyBool" default-constructor="MinBool(false)"> <include file-name="minbool.h" location="global"/> - <conversion-rule file="minbool_conversions.h"> + <conversion-rule> <native-to-target> return PyBool_FromLong(%in.value()); </native-to-target> @@ -19,7 +19,7 @@ <container-type name="std::list" type="list"> <include file-name="list" location="global"/> - <conversion-rule file="list_conversions.h"> + <conversion-rule> <native-to-target> PyObject* %out = PyList_New((int) %in.size()); %INTYPE::const_iterator it = %in.begin(); |