From 956640880da20c20d5320477a0dcaf2026bd9426 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 14 Sep 1994 13:23:36 +0000 Subject: pythonrun.h: added run_pyc_file ceval.h: added Py_AddPendingCall rest: modules using the new naming scheme must now include Python.h --- Include/Python.h | 3 +++ Include/allobjects.h | 2 -- Include/ceval.h | 2 ++ Include/pythonrun.h | 1 + Include/rename1.h | 11 ++++++++--- 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 Include/Python.h diff --git a/Include/Python.h b/Include/Python.h new file mode 100644 index 0000000..88ea8c0 --- /dev/null +++ b/Include/Python.h @@ -0,0 +1,3 @@ +/* Header file to be included by modules using new naming conventions */ +#include "allobjects.h" +#include "rename1.h" diff --git a/Include/allobjects.h b/Include/allobjects.h index 0acee93..d3cec89 100644 --- a/Include/allobjects.h +++ b/Include/allobjects.h @@ -76,8 +76,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "modsupport.h" #include "ceval.h" -#include "rename1.h" - extern void fatal PROTO((char *)); #ifdef __cplusplus diff --git a/Include/ceval.h b/Include/ceval.h index 3b16085..695c0c7 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -40,6 +40,8 @@ object *getframe PROTO((void)); void printtraceback PROTO((object *)); void flushline PROTO((void)); +int Py_AddPendingCall PROTO((int (*func) PROTO((ANY *)), ANY *arg)); + /* Interface for threads. diff --git a/Include/pythonrun.h b/Include/pythonrun.h index f2b9541..0ac9fb5 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -44,6 +44,7 @@ struct _node *parse_file PROTO((FILE *, char *, int)); object *run_string PROTO((char *, int, object *, object *)); object *run_file PROTO((FILE *, char *, int, object *, object *)); +object *run_pyc_file PROTO((FILE *, char *, object *, object *)); object *compile_string PROTO((char *, char *, int)); diff --git a/Include/rename1.h b/Include/rename1.h index 1b3d80a..22c5dcf 100755 --- a/Include/rename1.h +++ b/Include/rename1.h @@ -32,6 +32,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. "new style" names (e.g. PyObject) with the old style Python source distribution. */ +/* Remove some symbols (these conflict with X11 symbols) */ +#undef True +#undef False +#undef None + typedef ANY *PyUnivPtr; typedef struct methodlist PyMethodDef; @@ -147,9 +152,9 @@ typedef struct methodlist PyMethodDef; #define _Py_NewReference NEWREF #define _Py_Dealloc DELREF #define _Py_ForgetReference UNREF -#define Py_None None -#define Py_False False -#define Py_True True +#define Py_None (&_Py_NoneStruct) +#define Py_False ((object *) &_Py_ZeroStruct) +#define Py_True ((object *) &_Py_TrueStruct) #define PyObject_Compare cmpobject #define PyObject_GetAttrString getattr #define PyObject_GetAttr getattro -- cgit v0.12