summaryrefslogtreecommitdiff
path: root/lib/ldg_Python.h
diff options
context:
space:
mode:
authorJeff Armstrong <jeffrey.armstrong@approximatrix.com>2011-07-22 19:05:15 -0400
committerJeff Armstrong <jeffrey.armstrong@approximatrix.com>2011-07-22 19:05:15 -0400
commit6a51839ca252a993fee42c9e1b7c7079e74d652e (patch)
tree7deeb95ec14c10bf243d268cc2fdff4f1ebfa22e /lib/ldg_Python.h
parent4887bfbc732ff6ffe456a980874c65219ca08674 (diff)
downloadgempy-6a51839ca252a993fee42c9e1b7c7079e74d652e.tar.gz
gempy-6a51839ca252a993fee42c9e1b7c7079e74d652e.zip
Various fixes to get the example running.
Diffstat (limited to 'lib/ldg_Python.h')
-rw-r--r--lib/ldg_Python.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ldg_Python.h b/lib/ldg_Python.h
index e4538b4..5bb03c6 100644
--- a/lib/ldg_Python.h
+++ b/lib/ldg_Python.h
@@ -4,7 +4,7 @@
#include <Python.h>
#include <ldg.h>
-#define PY_API_FCOUNT 12
+#define PY_API_FCOUNT 14
#ifndef LDG_INTERNAL
extern void *pycallbacks[PY_API_FCOUNT];
@@ -26,6 +26,9 @@ PyObject *GEMError;
#define Py_DecRef(obj) ldg_callback(pycallbacks[9],obj)
#define Py_None ((PyObject *)pycallbacks[10])
#define PyArg_ParseTupleAndKeywords(tpl,...) ldg_callback(pycallbacks[11],tpl,##__VA_ARGS__)
+#define PyString_Check(obj) (Py_TYPE(obj) == pycallbacks[12])
+#define PyString_AsString(obj) (const char *)ldg_callback(pycallbacks[13],obj)
+
#define Py_INCREF(obj) ldg_callback(pycallbacks[8],obj)
#define Py_DECREF(obj) ldg_callback(pycallbacks[9],obj)