Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / include / python2.4 / pythonrun.h
CommitLineData
920dae64
AT
1
2/* Interfaces to parse and execute pieces of python code */
3
4#ifndef Py_PYTHONRUN_H
5#define Py_PYTHONRUN_H
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define PyCF_MASK (CO_FUTURE_DIVISION)
11#define PyCF_MASK_OBSOLETE (CO_GENERATOR_ALLOWED | CO_NESTED)
12#define PyCF_SOURCE_IS_UTF8 0x0100
13#define PyCF_DONT_IMPLY_DEDENT 0x0200
14
15typedef struct {
16 int cf_flags; /* bitmask of CO_xxx flags relevant to future */
17} PyCompilerFlags;
18
19PyAPI_FUNC(void) Py_SetProgramName(char *);
20PyAPI_FUNC(char *) Py_GetProgramName(void);
21
22PyAPI_FUNC(void) Py_SetPythonHome(char *);
23PyAPI_FUNC(char *) Py_GetPythonHome(void);
24
25PyAPI_FUNC(void) Py_Initialize(void);
26PyAPI_FUNC(void) Py_InitializeEx(int);
27PyAPI_FUNC(void) Py_Finalize(void);
28PyAPI_FUNC(int) Py_IsInitialized(void);
29PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
30PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
31
32PyAPI_FUNC(int) PyRun_AnyFile(FILE *, const char *);
33PyAPI_FUNC(int) PyRun_AnyFileEx(FILE *, const char *, int);
34
35PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
36PyAPI_FUNC(int) PyRun_AnyFileExFlags(FILE *, const char *, int, PyCompilerFlags *);
37
38PyAPI_FUNC(int) PyRun_SimpleString(const char *);
39PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
40PyAPI_FUNC(int) PyRun_SimpleFile(FILE *, const char *);
41PyAPI_FUNC(int) PyRun_SimpleFileEx(FILE *, const char *, int);
42PyAPI_FUNC(int) PyRun_SimpleFileExFlags(FILE *, const char *, int, PyCompilerFlags *);
43PyAPI_FUNC(int) PyRun_InteractiveOne(FILE *, const char *);
44PyAPI_FUNC(int) PyRun_InteractiveOneFlags(FILE *, const char *, PyCompilerFlags *);
45PyAPI_FUNC(int) PyRun_InteractiveLoop(FILE *, const char *);
46PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(FILE *, const char *, PyCompilerFlags *);
47
48PyAPI_FUNC(struct _node *) PyParser_SimpleParseString(const char *, int);
49PyAPI_FUNC(struct _node *) PyParser_SimpleParseFile(FILE *, const char *, int);
50PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int, int);
51PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlagsFilename(const char *,
52 const char *,
53 int,
54 int);
55PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *,
56 int, int);
57
58PyAPI_FUNC(PyObject *) PyRun_String(const char *, int, PyObject *, PyObject *);
59PyAPI_FUNC(PyObject *) PyRun_File(FILE *, const char *, int, PyObject *, PyObject *);
60PyAPI_FUNC(PyObject *) PyRun_FileEx(FILE *, const char *, int,
61 PyObject *, PyObject *, int);
62PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *, PyObject *,
63 PyCompilerFlags *);
64PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *, const char *, int, PyObject *,
65 PyObject *, PyCompilerFlags *);
66PyAPI_FUNC(PyObject *) PyRun_FileExFlags(FILE *, const char *, int, PyObject *,
67 PyObject *, int, PyCompilerFlags *);
68
69PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int);
70PyAPI_FUNC(PyObject *) Py_CompileStringFlags(const char *, const char *, int,
71 PyCompilerFlags *);
72PyAPI_FUNC(struct symtable *) Py_SymtableString(const char *, const char *, int);
73
74PyAPI_FUNC(void) PyErr_Print(void);
75PyAPI_FUNC(void) PyErr_PrintEx(int);
76PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
77
78PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
79
80PyAPI_FUNC(void) Py_Exit(int);
81
82PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
83
84/* Bootstrap */
85PyAPI_FUNC(int) Py_Main(int argc, char **argv);
86
87/* In getpath.c */
88PyAPI_FUNC(char *) Py_GetProgramFullPath(void);
89PyAPI_FUNC(char *) Py_GetPrefix(void);
90PyAPI_FUNC(char *) Py_GetExecPrefix(void);
91PyAPI_FUNC(char *) Py_GetPath(void);
92
93/* In their own files */
94PyAPI_FUNC(const char *) Py_GetVersion(void);
95PyAPI_FUNC(const char *) Py_GetPlatform(void);
96PyAPI_FUNC(const char *) Py_GetCopyright(void);
97PyAPI_FUNC(const char *) Py_GetCompiler(void);
98PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
99
100/* Internal -- various one-time initializations */
101PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
102PyAPI_FUNC(PyObject *) _PySys_Init(void);
103PyAPI_FUNC(void) _PyImport_Init(void);
104PyAPI_FUNC(void) _PyExc_Init(void);
105PyAPI_FUNC(void) _PyImportHooks_Init(void);
106PyAPI_FUNC(int) _PyFrame_Init(void);
107PyAPI_FUNC(int) _PyInt_Init(void);
108
109/* Various internal finalizers */
110PyAPI_FUNC(void) _PyExc_Fini(void);
111PyAPI_FUNC(void) _PyImport_Fini(void);
112PyAPI_FUNC(void) PyMethod_Fini(void);
113PyAPI_FUNC(void) PyFrame_Fini(void);
114PyAPI_FUNC(void) PyCFunction_Fini(void);
115PyAPI_FUNC(void) PyTuple_Fini(void);
116PyAPI_FUNC(void) PyList_Fini(void);
117PyAPI_FUNC(void) PyString_Fini(void);
118PyAPI_FUNC(void) PyInt_Fini(void);
119PyAPI_FUNC(void) PyFloat_Fini(void);
120PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
121
122/* Stuff with no proper home (yet) */
123PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, char *);
124PyAPI_DATA(int) (*PyOS_InputHook)(void);
125PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *);
126PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
127
128/* Stack size, in "pointers" (so we get extra safety margins
129 on 64-bit platforms). On a 32-bit platform, this translates
130 to a 8k margin. */
131#define PYOS_STACK_MARGIN 2048
132
133#if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER)
134/* Enable stack checking under Microsoft C */
135#define USE_STACKCHECK
136#endif
137
138#ifdef USE_STACKCHECK
139/* Check that we aren't overflowing our stack */
140PyAPI_FUNC(int) PyOS_CheckStack(void);
141#endif
142
143/* Signals */
144typedef void (*PyOS_sighandler_t)(int);
145PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
146PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
147
148
149#ifdef __cplusplus
150}
151#endif
152#endif /* !Py_PYTHONRUN_H */