summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-29 15:35:28 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-29 15:35:28 (GMT)
commit1818b7702b5ce1342a1847d735dfcd0cee3b5e61 (patch)
tree45f5ed1f45b435176f549815cdaf441d74f8040e
parent1875247549d8260002dca279c8d7b3c59f0a68cf (diff)
downloadcpython-1818b7702b5ce1342a1847d735dfcd0cee3b5e61.zip
cpython-1818b7702b5ce1342a1847d735dfcd0cee3b5e61.tar.gz
cpython-1818b7702b5ce1342a1847d735dfcd0cee3b5e61.tar.bz2
Moved rename2's macros relevant to this module here and added comment
about the file's obsolescence.
-rw-r--r--Include/cgensupport.h15
-rw-r--r--Modules/cgensupport.h15
2 files changed, 30 insertions, 0 deletions
diff --git a/Include/cgensupport.h b/Include/cgensupport.h
index 40b6a47..faf670e 100644
--- a/Include/cgensupport.h
+++ b/Include/cgensupport.h
@@ -37,6 +37,8 @@ PERFORMANCE OF THIS SOFTWARE.
/* Definitions used by cgen output */
+/* XXX This file is obsolete. It is *only* used by glmodule.c. */
+
typedef char *string;
#define mknewlongobject(x) PyInt_FromLong(x)
@@ -44,6 +46,19 @@ typedef char *string;
#define mknewfloatobject(x) PyFloat_FromDouble(x)
#define mknewcharobject(ch) Py_BuildValue("c", ch)
+#define getichararg PyArg_GetChar
+#define getidoublearray PyArg_GetDoubleArray
+#define getifloatarg PyArg_GetFloat
+#define getifloatarray PyArg_GetFloatArray
+#define getilongarg PyArg_GetLong
+#define getilongarray PyArg_GetLongArray
+#define getilongarraysize PyArg_GetLongArraySize
+#define getiobjectarg PyArg_GetObject
+#define getishortarg PyArg_GetShort
+#define getishortarray PyArg_GetShortArray
+#define getishortarraysize PyArg_GetShortArraySize
+#define getistringarg PyArg_GetString
+
extern int PyArg_GetObject Py_PROTO((PyObject *args, int nargs,
int i, PyObject **p_a));
extern int PyArg_GetLong Py_PROTO((PyObject *args, int nargs,
diff --git a/Modules/cgensupport.h b/Modules/cgensupport.h
index 40b6a47..faf670e 100644
--- a/Modules/cgensupport.h
+++ b/Modules/cgensupport.h
@@ -37,6 +37,8 @@ PERFORMANCE OF THIS SOFTWARE.
/* Definitions used by cgen output */
+/* XXX This file is obsolete. It is *only* used by glmodule.c. */
+
typedef char *string;
#define mknewlongobject(x) PyInt_FromLong(x)
@@ -44,6 +46,19 @@ typedef char *string;
#define mknewfloatobject(x) PyFloat_FromDouble(x)
#define mknewcharobject(ch) Py_BuildValue("c", ch)
+#define getichararg PyArg_GetChar
+#define getidoublearray PyArg_GetDoubleArray
+#define getifloatarg PyArg_GetFloat
+#define getifloatarray PyArg_GetFloatArray
+#define getilongarg PyArg_GetLong
+#define getilongarray PyArg_GetLongArray
+#define getilongarraysize PyArg_GetLongArraySize
+#define getiobjectarg PyArg_GetObject
+#define getishortarg PyArg_GetShort
+#define getishortarray PyArg_GetShortArray
+#define getishortarraysize PyArg_GetShortArraySize
+#define getistringarg PyArg_GetString
+
extern int PyArg_GetObject Py_PROTO((PyObject *args, int nargs,
int i, PyObject **p_a));
extern int PyArg_GetLong Py_PROTO((PyObject *args, int nargs,