annotate Include/pythonrun.h @ 18611:fdb36a0c7e6e legacy-trunk

Part way to allowing "from __future__ import generators" to communicate that info to code dynamically compiled *by* code compiled with generators enabled. Doesn't yet work because there's still no way to tell the parser that "yield" is OK (unlike nested_scopes, the parser has its fingers in this too). Replaced PyEval_GetNestedScopes by a more-general PyEval_MergeCompilerFlags. Perhaps I should not have? I doubted it was *intended* to be part of the public API, so just did.
author Tim Peters <tim.peters@gmail.com>
date Mon, 16 Jul 2001 02:29:45 +0000
parents b44e77a12978
children 0a90e5ec61b6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
853b736a6a9e Added copyright notice.
Guido van Rossum <guido@python.org>
parents: 86
diff changeset
1
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 /* Interfaces to parse and execute pieces of python code */
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
3
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
4 #ifndef Py_PYTHONRUN_H
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
5 #define Py_PYTHONRUN_H
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
6 #ifdef __cplusplus
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
7 extern "C" {
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
8 #endif
5862
4dbb4ec44d15 Added declarations for Py_{Set,Get}ProgramName() and a bunch of other
Guido van Rossum <guido@python.org>
parents: 5111
diff changeset
9
18611
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 17164
diff changeset
10 /* These flags are named after the __future__ statements that introduced
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 17164
diff changeset
11 them. May not remain true for later additions, so fiddle this comment
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 17164
diff changeset
12 accordingly then. */
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 17164
diff changeset
13 #define PyCF_NESTED_SCOPES (0x00000001UL)
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 17164
diff changeset
14 #define PyCF_GENERATORS (0x00000002UL)
16916
b0456d3a0f1f Useful future statement support for the interactive interpreter
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16421
diff changeset
15 typedef struct {
18611
fdb36a0c7e6e Part way to allowing "from __future__ import generators" to communicate
Tim Peters <tim.peters@gmail.com>
parents: 17164
diff changeset
16 unsigned long cf_flags; /* bitmask of PyCF_xxx flags */
16916
b0456d3a0f1f Useful future statement support for the interactive interpreter
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16421
diff changeset
17 } PyCompilerFlags;
b0456d3a0f1f Useful future statement support for the interactive interpreter
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16421
diff changeset
18
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
19 DL_IMPORT(void) Py_SetProgramName(char *);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
20 DL_IMPORT(char *) Py_GetProgramName(void);
7208
ce271e5f9bc5 - Add Py_GetPythonHome() and Py_SetPythonHome(), intended to allow
Guido van Rossum <guido@python.org>
parents: 6192
diff changeset
21
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
22 DL_IMPORT(void) Py_SetPythonHome(char *);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
23 DL_IMPORT(char *) Py_GetPythonHome(void);
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
24
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
25 DL_IMPORT(void) Py_Initialize(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
26 DL_IMPORT(void) Py_Finalize(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
27 DL_IMPORT(int) Py_IsInitialized(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
28 DL_IMPORT(PyThreadState *) Py_NewInterpreter(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
29 DL_IMPORT(void) Py_EndInterpreter(PyThreadState *);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
30
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
31 DL_IMPORT(int) PyRun_AnyFile(FILE *, char *);
14228
20377f15b96a Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),
Guido van Rossum <guido@python.org>
parents: 14227
diff changeset
32 DL_IMPORT(int) PyRun_AnyFileEx(FILE *, char *, int);
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
33
17125
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
34 DL_IMPORT(int) PyRun_AnyFileFlags(FILE *, char *, PyCompilerFlags *);
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
35 DL_IMPORT(int) PyRun_AnyFileExFlags(FILE *, char *, int, PyCompilerFlags *);
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
36
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
37 DL_IMPORT(int) PyRun_SimpleString(char *);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
38 DL_IMPORT(int) PyRun_SimpleFile(FILE *, char *);
14228
20377f15b96a Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),
Guido van Rossum <guido@python.org>
parents: 14227
diff changeset
39 DL_IMPORT(int) PyRun_SimpleFileEx(FILE *, char *, int);
17125
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
40 DL_IMPORT(int) PyRun_SimpleFileExFlags(FILE *, char *, int, PyCompilerFlags *);
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
41 DL_IMPORT(int) PyRun_InteractiveOne(FILE *, char *);
16916
b0456d3a0f1f Useful future statement support for the interactive interpreter
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16421
diff changeset
42 DL_IMPORT(int) PyRun_InteractiveOneFlags(FILE *, char *, PyCompilerFlags *);
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
43 DL_IMPORT(int) PyRun_InteractiveLoop(FILE *, char *);
17125
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
44 DL_IMPORT(int) PyRun_InteractiveLoopFlags(FILE *, char *, PyCompilerFlags *);
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
45
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
46 DL_IMPORT(struct _node *) PyParser_SimpleParseString(char *, int);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
47 DL_IMPORT(struct _node *) PyParser_SimpleParseFile(FILE *, char *, int);
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
48
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
49 DL_IMPORT(PyObject *) PyRun_String(char *, int, PyObject *, PyObject *);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
50 DL_IMPORT(PyObject *) PyRun_File(FILE *, char *, int, PyObject *, PyObject *);
14228
20377f15b96a Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),
Guido van Rossum <guido@python.org>
parents: 14227
diff changeset
51 DL_IMPORT(PyObject *) PyRun_FileEx(FILE *, char *, int,
20377f15b96a Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),
Guido van Rossum <guido@python.org>
parents: 14227
diff changeset
52 PyObject *, PyObject *, int);
17125
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
53 DL_IMPORT(PyObject *) PyRun_StringFlags(char *, int, PyObject *, PyObject *,
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
54 PyCompilerFlags *);
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
55 DL_IMPORT(PyObject *) PyRun_FileFlags(FILE *, char *, int, PyObject *,
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
56 PyObject *, PyCompilerFlags *);
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
57 DL_IMPORT(PyObject *) PyRun_FileExFlags(FILE *, char *, int, PyObject *,
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
58 PyObject *, int, PyCompilerFlags *);
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
59
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
60 DL_IMPORT(PyObject *) Py_CompileString(char *, char *, int);
17125
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
61 DL_IMPORT(PyObject *) Py_CompileStringFlags(char *, char *, int,
2054cea38754 Extend support for from __future__ import nested_scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16916
diff changeset
62 PyCompilerFlags *);
16421
aa844711463a Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15153
diff changeset
63 DL_IMPORT(struct symtable *) Py_SymtableString(char *, char *, int);
1263
65a1e4e9cd54 * Fixed some subtleties with fastlocals. You can no longer access
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
64
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
65 DL_IMPORT(void) PyErr_Print(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
66 DL_IMPORT(void) PyErr_PrintEx(int);
17164
b44e77a12978 Add sys.excepthook.
Ka-Ping Yee <ping@zesty.ca>
parents: 17125
diff changeset
67 DL_IMPORT(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
68
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
69 DL_IMPORT(int) Py_AtExit(void (*func)(void));
1868
63ad28939781 pythgonrun.h: added Py_AtExit().
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
70
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
71 DL_IMPORT(void) Py_Exit(int);
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
72
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
73 DL_IMPORT(int) Py_FdIsInteractive(FILE *, char *);
5111
21b871325c85 Added decl for Py_FdIsInteractive.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
74
5862
4dbb4ec44d15 Added declarations for Py_{Set,Get}ProgramName() and a bunch of other
Guido van Rossum <guido@python.org>
parents: 5111
diff changeset
75 /* In getpath.c */
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
76 DL_IMPORT(char *) Py_GetProgramFullPath(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
77 DL_IMPORT(char *) Py_GetPrefix(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
78 DL_IMPORT(char *) Py_GetExecPrefix(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
79 DL_IMPORT(char *) Py_GetPath(void);
5862
4dbb4ec44d15 Added declarations for Py_{Set,Get}ProgramName() and a bunch of other
Guido van Rossum <guido@python.org>
parents: 5111
diff changeset
80
4dbb4ec44d15 Added declarations for Py_{Set,Get}ProgramName() and a bunch of other
Guido van Rossum <guido@python.org>
parents: 5111
diff changeset
81 /* In their own files */
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
82 DL_IMPORT(const char *) Py_GetVersion(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
83 DL_IMPORT(const char *) Py_GetPlatform(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
84 DL_IMPORT(const char *) Py_GetCopyright(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
85 DL_IMPORT(const char *) Py_GetCompiler(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
86 DL_IMPORT(const char *) Py_GetBuildInfo(void);
5862
4dbb4ec44d15 Added declarations for Py_{Set,Get}ProgramName() and a bunch of other
Guido van Rossum <guido@python.org>
parents: 5111
diff changeset
87
5919
5da18e002b1a Mass checkin (more to follow for other directories).
Guido van Rossum <guido@python.org>
parents: 5862
diff changeset
88 /* Internal -- various one-time initializations */
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
89 DL_IMPORT(PyObject *) _PyBuiltin_Init(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
90 DL_IMPORT(PyObject *) _PySys_Init(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
91 DL_IMPORT(void) _PyImport_Init(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
92 DL_IMPORT(void) init_exceptions(void);
5919
5da18e002b1a Mass checkin (more to follow for other directories).
Guido van Rossum <guido@python.org>
parents: 5862
diff changeset
93
5984
b4bbba3af4e8 Added prototype for various finalizers.
Guido van Rossum <guido@python.org>
parents: 5919
diff changeset
94 /* Various internal finalizers */
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
95 DL_IMPORT(void) fini_exceptions(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
96 DL_IMPORT(void) _PyImport_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
97 DL_IMPORT(void) PyMethod_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
98 DL_IMPORT(void) PyFrame_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
99 DL_IMPORT(void) PyCFunction_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
100 DL_IMPORT(void) PyTuple_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
101 DL_IMPORT(void) PyString_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
102 DL_IMPORT(void) PyInt_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
103 DL_IMPORT(void) PyFloat_Fini(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
104 DL_IMPORT(void) PyOS_FiniInterrupts(void);
5984
b4bbba3af4e8 Added prototype for various finalizers.
Guido van Rossum <guido@python.org>
parents: 5919
diff changeset
105
5986
32127593c134 Added decls for stuff from myreadline.
Guido van Rossum <guido@python.org>
parents: 5984
diff changeset
106 /* Stuff with no proper home (yet) */
13445
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
107 DL_IMPORT(char *) PyOS_Readline(char *);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
108 extern DL_IMPORT(int) (*PyOS_InputHook)(void);
091ca6b9348f ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
109 extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer)(char *);
14227
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
110
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
111 /* Stack size, in "pointers" (so we get extra safety margins
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
112 on 64-bit platforms). On a 32-bit platform, this translates
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
113 to a 8k margin. */
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
114 #define PYOS_STACK_MARGIN 2048
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
115
15153
e17d8cd09689 Use suggested workaround for PyOS_CheckStack causing failure of test_[s]re.py
Trent Mick <trentm@activestate.com>
parents: 14636
diff changeset
116 #if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER)
14227
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
117 /* Enable stack checking under Microsoft C */
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
118 #define USE_STACKCHECK
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
119 #endif
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
120
13887
c0c17347da5b Added a prototype for PyOS_CheckStack (within #ifdef USE_STACKCHECK).
Jack Jansen <jack.jansen@cwi.nl>
parents: 13445
diff changeset
121 #ifdef USE_STACKCHECK
14227
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
122 /* Check that we aren't overflowing our stack */
9f9f3280dc68 implements PyOS_CheckStack for Windows and MSVC. this fixes a
Fredrik Lundh <fredrik@pythonware.com>
parents: 13887
diff changeset
123 DL_IMPORT(int) PyOS_CheckStack(void);
13887
c0c17347da5b Added a prototype for PyOS_CheckStack (within #ifdef USE_STACKCHECK).
Jack Jansen <jack.jansen@cwi.nl>
parents: 13445
diff changeset
124 #endif
5986
32127593c134 Added decls for stuff from myreadline.
Guido van Rossum <guido@python.org>
parents: 5984
diff changeset
125
14636
0c303a22d9a4 Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() and
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
126 /* Signals */
0c303a22d9a4 Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() and
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
127 typedef void (*PyOS_sighandler_t)(int);
0c303a22d9a4 Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() and
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
128 DL_IMPORT(PyOS_sighandler_t) PyOS_getsig(int);
0c303a22d9a4 Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() and
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
129 DL_IMPORT(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
0c303a22d9a4 Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() and
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
130
0c303a22d9a4 Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() and
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
131
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
132 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
133 }
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
134 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
135 #endif /* !Py_PYTHONRUN_H */