Skip to content

Commit 9566408

Browse files
committed
pythonrun.h: added run_pyc_file
ceval.h: added Py_AddPendingCall rest: modules using the new naming scheme must now include Python.h
1 parent f5e0ea8 commit 9566408

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

Include/Python.h

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* Header file to be included by modules using new naming conventions */
2+
#include "allobjects.h"
3+
#include "rename1.h"

Include/allobjects.h

-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
7676
#include "modsupport.h"
7777
#include "ceval.h"
7878

79-
#include "rename1.h"
80-
8179
extern void fatal PROTO((char *));
8280

8381
#ifdef __cplusplus

Include/ceval.h

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ object *getframe PROTO((void));
4040
void printtraceback PROTO((object *));
4141
void flushline PROTO((void));
4242

43+
int Py_AddPendingCall PROTO((int (*func) PROTO((ANY *)), ANY *arg));
44+
4345

4446
/* Interface for threads.
4547

Include/pythonrun.h

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ struct _node *parse_file PROTO((FILE *, char *, int));
4444

4545
object *run_string PROTO((char *, int, object *, object *));
4646
object *run_file PROTO((FILE *, char *, int, object *, object *));
47+
object *run_pyc_file PROTO((FILE *, char *, object *, object *));
4748

4849
object *compile_string PROTO((char *, char *, int));
4950

Include/rename1.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3232
"new style" names (e.g. PyObject) with the old style Python source
3333
distribution. */
3434

35+
/* Remove some symbols (these conflict with X11 symbols) */
36+
#undef True
37+
#undef False
38+
#undef None
39+
3540
typedef ANY *PyUnivPtr;
3641
typedef struct methodlist PyMethodDef;
3742

@@ -147,9 +152,9 @@ typedef struct methodlist PyMethodDef;
147152
#define _Py_NewReference NEWREF
148153
#define _Py_Dealloc DELREF
149154
#define _Py_ForgetReference UNREF
150-
#define Py_None None
151-
#define Py_False False
152-
#define Py_True True
155+
#define Py_None (&_Py_NoneStruct)
156+
#define Py_False ((object *) &_Py_ZeroStruct)
157+
#define Py_True ((object *) &_Py_TrueStruct)
153158
#define PyObject_Compare cmpobject
154159
#define PyObject_GetAttrString getattr
155160
#define PyObject_GetAttr getattro

0 commit comments

Comments
 (0)