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