Add islhelper.c library to handle isl constants
[linpy.git] / pypol / islhelper.c
diff --git a/pypol/islhelper.c b/pypol/islhelper.c
new file mode 100644 (file)
index 0000000..38f249d
--- /dev/null
@@ -0,0 +1,25 @@
+#include <Python.h>
+#include <isl/space.h>
+
+static PyMethodDef islhelper_methods[] = {
+    {NULL, NULL, 0, NULL}
+};
+
+static struct PyModuleDef islhelpermodule = {
+    PyModuleDef_HEAD_INIT,
+    "islhelper",
+    NULL,
+    -1,
+    islhelper_methods
+};
+
+PyMODINIT_FUNC PyInit_islhelper(void) {
+    PyObject *m;
+    m = PyModule_Create(&islhelpermodule);
+    if (m == NULL)
+        return NULL;
+
+    PyModule_AddObject(m, "isl_dim_set", PyLong_FromLong(isl_dim_set));
+
+    return m;
+}