summaryrefslogtreecommitdiff
path: root/lib/ldg_Python.h
diff options
context:
space:
mode:
authorJeff Armstrong <jeffrey.armstrong@approximatrix.com>2011-07-11 22:47:19 -0400
committerJeff Armstrong <jeffrey.armstrong@approximatrix.com>2011-07-11 22:47:19 -0400
commit020592344c70c1b287e52729086a493211daea5a (patch)
treef787f919f6aadba044f93030718e6827f21e76c1 /lib/ldg_Python.h
parentd89bc67baf8e8f77de9240a4c991a6a98ff950c4 (diff)
downloadgempy-020592344c70c1b287e52729086a493211daea5a.tar.gz
gempy-020592344c70c1b287e52729086a493211daea5a.zip
Starting logical reorg of the native GEM calls.
Diffstat (limited to 'lib/ldg_Python.h')
-rw-r--r--lib/ldg_Python.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ldg_Python.h b/lib/ldg_Python.h
new file mode 100644
index 0000000..1a79e18
--- /dev/null
+++ b/lib/ldg_Python.h
@@ -0,0 +1,16 @@
+#ifndef __LDG_PYTHON_HEADERS
+#define __LDG_PYTHON_HEADERS
+
+#include <Python.h>
+
+#define PY_API_FCOUNT 3
+
+#ifndef LDG_INTERNAL
+extern void *pycallbacks[PY_API_FCOUNT];
+#endif
+
+#define Py_InitModule(name,methods) ldg_callback(pycallbacks[0],name,methods,NULL,NULL)
+#define PyArg_ParseTuple(tpl,...) ldg_callback(pycallbacks[1],tpl,##__VA_ARGS__)
+#define Py_BuildValue(fmt,...) ldg_callback(pycallbacks[2],fmt,##__VA_ARGS__)
+
+#endif /*__LDG_PYTHON_HEADERS */ \ No newline at end of file