summaryrefslogtreecommitdiffstats
path: root/tests/testhelpermodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testhelpermodule.c')
-rw-r--r--tests/testhelpermodule.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
new file mode 100644
index 0000000..6b6a914
--- /dev/null
+++ b/tests/testhelpermodule.c
@@ -0,0 +1,23 @@
+#include "pygobject.h"
+
+PyObject *
+_wrap_get_tp_basicsize (PyObject * self,
+ PyObject * args)
+{
+ PyObject *item;
+ item = PyTuple_GetItem(args, 0);
+
+ return PyInt_FromLong(((PyTypeObject*)item)->tp_basicsize);
+}
+
+static PyMethodDef testhelper_methods[] = {
+ { "get_tp_basicsize", _wrap_get_tp_basicsize, METH_VARARGS },
+ { NULL, NULL }
+};
+
+void
+inittesthelper ()
+{
+ Py_InitModule ("testhelper", testhelper_methods);
+}
+