/usr/include/tomoe/pytomoe-utils.h is in libtomoe-dev 0.6.0-1.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #define CONVERT_OBJECT_LIST(py_list, g_list) \
{ \
GList *node; \
py_list = PyList_New (0); \
for (node = g_list; node; node = g_list_next(node)) \
{ \
PyObject *py_obj = pygobject_new ((GObject *)node->data); \
PyList_Append (py_list, py_obj); \
Py_DECREF(py_obj); \
} \
}
#define CONVERT_POINTER_LIST(py_list, g_list) \
{ \
GList *node; \
py_list = PyList_New (0); \
for (node = g_list; node; node = g_list_next(node)) \
{ \
PyObject *py_obj = PyCObject_FromVoidPtr (node->data, NULL); \
PyList_Append (py_list, py_obj); \
Py_DECREF(py_obj); \
} \
}
#define CONVERT_STRING_LIST(py_list, g_list) \
{ \
GList *node; \
py_list = PyList_New (0); \
for (node = g_list; node; node = g_list_next(node)) \
{ \
PyObject *py_obj = PyString_FromString ((const gchar *)node->data); \
PyList_Append (py_list, py_obj); \
Py_DECREF(py_obj); \
} \
}
|