Kaydet (Commit) 95664088 authored tarafından Guido van Rossum's avatar Guido van Rossum

pythonrun.h: added run_pyc_file

ceval.h: added Py_AddPendingCall
rest: modules using the new naming scheme must now include Python.h
üst f5e0ea89
/* Header file to be included by modules using new naming conventions */
#include "allobjects.h"
#include "rename1.h"
...@@ -76,8 +76,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -76,8 +76,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "modsupport.h" #include "modsupport.h"
#include "ceval.h" #include "ceval.h"
#include "rename1.h"
extern void fatal PROTO((char *)); extern void fatal PROTO((char *));
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -40,6 +40,8 @@ object *getframe PROTO((void)); ...@@ -40,6 +40,8 @@ object *getframe PROTO((void));
void printtraceback PROTO((object *)); void printtraceback PROTO((object *));
void flushline PROTO((void)); void flushline PROTO((void));
int Py_AddPendingCall PROTO((int (*func) PROTO((ANY *)), ANY *arg));
/* Interface for threads. /* Interface for threads.
......
...@@ -44,6 +44,7 @@ struct _node *parse_file PROTO((FILE *, char *, int)); ...@@ -44,6 +44,7 @@ struct _node *parse_file PROTO((FILE *, char *, int));
object *run_string PROTO((char *, int, object *, object *)); object *run_string PROTO((char *, int, object *, object *));
object *run_file PROTO((FILE *, 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)); object *compile_string PROTO((char *, char *, int));
......
...@@ -32,6 +32,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -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 "new style" names (e.g. PyObject) with the old style Python source
distribution. */ distribution. */
/* Remove some symbols (these conflict with X11 symbols) */
#undef True
#undef False
#undef None
typedef ANY *PyUnivPtr; typedef ANY *PyUnivPtr;
typedef struct methodlist PyMethodDef; typedef struct methodlist PyMethodDef;
...@@ -147,9 +152,9 @@ typedef struct methodlist PyMethodDef; ...@@ -147,9 +152,9 @@ typedef struct methodlist PyMethodDef;
#define _Py_NewReference NEWREF #define _Py_NewReference NEWREF
#define _Py_Dealloc DELREF #define _Py_Dealloc DELREF
#define _Py_ForgetReference UNREF #define _Py_ForgetReference UNREF
#define Py_None None #define Py_None (&_Py_NoneStruct)
#define Py_False False #define Py_False ((object *) &_Py_ZeroStruct)
#define Py_True True #define Py_True ((object *) &_Py_TrueStruct)
#define PyObject_Compare cmpobject #define PyObject_Compare cmpobject
#define PyObject_GetAttrString getattr #define PyObject_GetAttrString getattr
#define PyObject_GetAttr getattro #define PyObject_GetAttr getattro
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment