2005-10-20 19:59:25 +00:00
|
|
|
#ifndef Py_CODE_H
|
|
|
|
#include "code.h"
|
|
|
|
#endif
|
1990-12-20 15:06:42 +00:00
|
|
|
|
2000-07-09 00:20:36 +00:00
|
|
|
#ifndef Py_COMPILE_H
|
|
|
|
#define Py_COMPILE_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
1990-12-20 15:06:42 +00:00
|
|
|
/* Public interface */
|
1991-04-03 19:00:55 +00:00
|
|
|
struct _node; /* Declare the existence of this type */
|
2002-12-11 14:04:59 +00:00
|
|
|
PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
|
1993-07-28 09:05:47 +00:00
|
|
|
|
2001-02-27 19:07:02 +00:00
|
|
|
/* Future feature support */
|
|
|
|
|
|
|
|
typedef struct {
|
2005-10-20 19:59:25 +00:00
|
|
|
int ff_features; /* flags set by future statements */
|
|
|
|
int ff_lineno; /* line number of last future statement */
|
2001-02-27 19:07:02 +00:00
|
|
|
} PyFutureFeatures;
|
|
|
|
|
|
|
|
#define FUTURE_NESTED_SCOPES "nested_scopes"
|
2001-07-15 21:08:29 +00:00
|
|
|
#define FUTURE_GENERATORS "generators"
|
2001-08-08 05:00:18 +00:00
|
|
|
#define FUTURE_DIVISION "division"
|
|
|
|
|
2005-10-20 19:59:25 +00:00
|
|
|
struct _mod; /* Declare the existence of this type */
|
|
|
|
DL_IMPORT(PyCodeObject *) PyAST_Compile(struct _mod *, const char *,
|
|
|
|
PyCompilerFlags *);
|
|
|
|
DL_IMPORT(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
|
|
|
|
|
|
|
|
#define ERR_LATE_FUTURE \
|
|
|
|
"from __future__ imports must occur at the beginning of the file"
|
|
|
|
|
1993-07-28 09:05:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_COMPILE_H */
|