summaryrefslogtreecommitdiff
path: root/doc/pyrex/c_python.pxd
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2008-08-23 23:17:23 +0000
committerStefan van der Walt <stefan@sun.ac.za>2008-08-23 23:17:23 +0000
commit5c86844c34674e3d580ac2cd12ef171e18130b13 (patch)
tree2fdf1150706c07c7e193eb7483ce58a5074e5774 /doc/pyrex/c_python.pxd
parent376d483d31c4c5427510cf3a8c69fc795aef63aa (diff)
downloadnumpy-5c86844c34674e3d580ac2cd12ef171e18130b13.tar.gz
Move documentation outside of source tree. Remove `doc` import from __init__.
Diffstat (limited to 'doc/pyrex/c_python.pxd')
-rw-r--r--doc/pyrex/c_python.pxd20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/pyrex/c_python.pxd b/doc/pyrex/c_python.pxd
new file mode 100644
index 000000000..53f6d9b19
--- /dev/null
+++ b/doc/pyrex/c_python.pxd
@@ -0,0 +1,20 @@
+# -*- Mode: Python -*- Not really, but close enough
+
+# Expose as much of the Python C API as we need here
+
+cdef extern from "stdlib.h":
+ ctypedef int size_t
+
+cdef extern from "Python.h":
+ ctypedef int Py_intptr_t
+ void* PyMem_Malloc(size_t)
+ void* PyMem_Realloc(void *p, size_t n)
+ void PyMem_Free(void *p)
+ char* PyString_AsString(object string)
+ object PyString_FromString(char *v)
+ object PyString_InternFromString(char *v)
+ int PyErr_CheckSignals()
+ object PyFloat_FromDouble(double v)
+ void Py_XINCREF(object o)
+ void Py_XDECREF(object o)
+ void Py_CLEAR(object o) # use instead of decref