blob: c364947685170f104b3a637c417ef4a489f32aa1 [file] [log] [blame]
Guido van Rossumf70e43a1991-02-19 12:39:46 +00001
Guido van Rossum3f5da241990-12-20 15:06:42 +00002/* Interfaces to parse and execute pieces of python code */
3
Fred Drake3cf4d2b2000-07-09 00:55:06 +00004#ifndef Py_PYTHONRUN_H
5#define Py_PYTHONRUN_H
6#ifdef __cplusplus
7extern "C" {
8#endif
Guido van Rossum57d8e3f1997-07-19 19:50:52 +00009
Benjamin Peterson466a7822009-07-02 21:44:01 +000010#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
11 CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
12 CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL)
Benjamin Petersonffeaa882009-07-02 21:54:36 +000013#define PyCF_MASK_OBSOLETE (CO_NESTED)
Just van Rossum3aaf42c2003-02-10 08:21:10 +000014#define PyCF_SOURCE_IS_UTF8 0x0100
Guido van Rossum4b499dd32003-02-13 22:07:59 +000015#define PyCF_DONT_IMPLY_DEDENT 0x0200
Martin v. Löwisbd260da2006-02-26 19:42:26 +000016#define PyCF_ONLY_AST 0x0400
Benjamin Petersonf5b52242009-03-02 23:31:26 +000017#define PyCF_IGNORE_COOKIE 0x0800
Tim Peterse2c18e92001-08-17 20:47:47 +000018
Martin v. Löwis4d0d4712010-12-03 20:14:31 +000019#ifndef Py_LIMITED_API
Jeremy Hylton9f324e92001-03-01 22:59:14 +000020typedef struct {
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000021 int cf_flags; /* bitmask of CO_xxx flags relevant to future */
Jeremy Hylton9f324e92001-03-01 22:59:14 +000022} PyCompilerFlags;
Martin v. Löwis4d0d4712010-12-03 20:14:31 +000023#endif
Jeremy Hylton9f324e92001-03-01 22:59:14 +000024
Martin v. Löwis790465f2008-04-05 20:41:37 +000025PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
26PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
Guido van Rossum66d4b901998-02-06 22:28:05 +000027
Martin v. Löwis790465f2008-04-05 20:41:37 +000028PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
29PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
Guido van Rossum3f5da241990-12-20 15:06:42 +000030
Nick Coghlan1805a622013-10-18 23:11:47 +100031#ifndef Py_LIMITED_API
32/* Only used by applications that embed the interpreter and need to
33 * override the standard encoding determination mechanism
34 */
Nick Coghlana0f074f2013-10-17 23:27:17 +100035PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
36 const char *errors);
Nick Coghlan1805a622013-10-18 23:11:47 +100037#endif
Nick Coghlana0f074f2013-10-17 23:27:17 +100038
Mark Hammond91a681d2002-08-12 07:21:58 +000039PyAPI_FUNC(void) Py_Initialize(void);
Martin v. Löwis336e85f2004-08-19 11:31:58 +000040PyAPI_FUNC(void) Py_InitializeEx(int);
Antoine Pitroue67f48c2012-06-19 22:29:35 +020041#ifndef Py_LIMITED_API
42PyAPI_FUNC(void) _Py_InitializeEx_Private(int, int);
43#endif
Mark Hammond91a681d2002-08-12 07:21:58 +000044PyAPI_FUNC(void) Py_Finalize(void);
45PyAPI_FUNC(int) Py_IsInitialized(void);
46PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
47PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
Guido van Rossum3f5da241990-12-20 15:06:42 +000048
Martin v. Löwis4d0d4712010-12-03 20:14:31 +000049#ifndef Py_LIMITED_API
50PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
Martin v. Löwis056a69c2006-03-01 16:55:42 +000051PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
Victor Stinner00676d12010-12-27 01:49:31 +000052PyAPI_FUNC(int) PyRun_AnyFileExFlags(
53 FILE *fp,
54 const char *filename, /* decoded from the filesystem encoding */
55 int closeit,
56 PyCompilerFlags *flags);
57PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
58 FILE *fp,
59 const char *filename, /* decoded from the filesystem encoding */
60 int closeit,
61 PyCompilerFlags *flags);
62PyAPI_FUNC(int) PyRun_InteractiveOneFlags(
63 FILE *fp,
64 const char *filename, /* decoded from the filesystem encoding */
65 PyCompilerFlags *flags);
Victor Stinner95701bd2013-11-06 18:41:07 +010066PyAPI_FUNC(int) PyRun_InteractiveOneObject(
67 FILE *fp,
68 PyObject *filename,
69 PyCompilerFlags *flags);
Victor Stinner00676d12010-12-27 01:49:31 +000070PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(
71 FILE *fp,
72 const char *filename, /* decoded from the filesystem encoding */
73 PyCompilerFlags *flags);
Guido van Rossum3f5da241990-12-20 15:06:42 +000074
Victor Stinner00676d12010-12-27 01:49:31 +000075PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(
76 const char *s,
77 const char *filename, /* decoded from the filesystem encoding */
78 int start,
79 PyCompilerFlags *flags,
80 PyArena *arena);
Victor Stinner14e461d2013-08-26 22:28:21 +020081PyAPI_FUNC(struct _mod *) PyParser_ASTFromStringObject(
82 const char *s,
83 PyObject *filename,
84 int start,
85 PyCompilerFlags *flags,
86 PyArena *arena);
Victor Stinner00676d12010-12-27 01:49:31 +000087PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
88 FILE *fp,
89 const char *filename, /* decoded from the filesystem encoding */
90 const char* enc,
91 int start,
92 char *ps1,
93 char *ps2,
94 PyCompilerFlags *flags,
95 int *errcode,
96 PyArena *arena);
Victor Stinner14e461d2013-08-26 22:28:21 +020097PyAPI_FUNC(struct _mod *) PyParser_ASTFromFileObject(
98 FILE *fp,
99 PyObject *filename,
100 const char* enc,
101 int start,
102 char *ps1,
103 char *ps2,
104 PyCompilerFlags *flags,
105 int *errcode,
106 PyArena *arena);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000107#endif
108
109#ifndef PyParser_SimpleParseString
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000110#define PyParser_SimpleParseString(S, B) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000111 PyParser_SimpleParseStringFlags(S, B, 0)
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000112#define PyParser_SimpleParseFile(FP, S, B) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000113 PyParser_SimpleParseFileFlags(FP, S, B, 0)
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000114#endif
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000115PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int,
Eli Bendersky08131682012-06-03 08:07:47 +0300116 int);
117PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlagsFilename(const char *,
118 const char *,
119 int, int);
Martin v. Löwis95292d62002-12-11 14:04:59 +0000120PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *,
Eli Bendersky08131682012-06-03 08:07:47 +0300121 int, int);
Guido van Rossum3f5da241990-12-20 15:06:42 +0000122
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000123#ifndef Py_LIMITED_API
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000124PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
125 PyObject *, PyCompilerFlags *);
Guido van Rossum5b722181993-03-30 17:46:03 +0000126
Victor Stinner00676d12010-12-27 01:49:31 +0000127PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
128 FILE *fp,
129 const char *filename, /* decoded from the filesystem encoding */
130 int start,
131 PyObject *globals,
132 PyObject *locals,
133 int closeit,
134 PyCompilerFlags *flags);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000135#endif
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000136
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000137#ifdef Py_LIMITED_API
Martin v. Löwis0d012f22010-12-04 12:00:49 +0000138PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000139#else
Georg Brandl8334fd92010-12-04 10:26:46 +0000140#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1)
141#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1)
Victor Stinner00676d12010-12-27 01:49:31 +0000142PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
143 const char *str,
144 const char *filename, /* decoded from the filesystem encoding */
145 int start,
146 PyCompilerFlags *flags,
147 int optimize);
Victor Stinner14e461d2013-08-26 22:28:21 +0200148PyAPI_FUNC(PyObject *) Py_CompileStringObject(
149 const char *str,
150 PyObject *filename, int start,
151 PyCompilerFlags *flags,
152 int optimize);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000153#endif
Victor Stinner00676d12010-12-27 01:49:31 +0000154PyAPI_FUNC(struct symtable *) Py_SymtableString(
155 const char *str,
156 const char *filename, /* decoded from the filesystem encoding */
157 int start);
Victor Stinner14e461d2013-08-26 22:28:21 +0200158PyAPI_FUNC(struct symtable *) Py_SymtableStringObject(
159 const char *str,
160 PyObject *filename,
161 int start);
Guido van Rossum3f5da241990-12-20 15:06:42 +0000162
Mark Hammond91a681d2002-08-12 07:21:58 +0000163PyAPI_FUNC(void) PyErr_Print(void);
164PyAPI_FUNC(void) PyErr_PrintEx(int);
165PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
Guido van Rossumc6cf1dd1994-09-07 14:35:10 +0000166
Collin Winter670e6922007-03-21 02:57:17 +0000167/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
168 * exit functions.
169 */
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000170#ifndef Py_LIMITED_API
Collin Winter670e6922007-03-21 02:57:17 +0000171PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(void));
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000172#endif
Mark Hammond91a681d2002-08-12 07:21:58 +0000173PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
Guido van Rossuma3309961993-07-28 09:05:47 +0000174
Mark Hammond91a681d2002-08-12 07:21:58 +0000175PyAPI_FUNC(void) Py_Exit(int);
Fred Drake3cf4d2b2000-07-09 00:55:06 +0000176
Gregory P. Smithfb94c5f2010-03-14 06:49:55 +0000177/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000178#ifndef Py_LIMITED_API
Gregory P. Smithfb94c5f2010-03-14 06:49:55 +0000179PyAPI_FUNC(void) _Py_RestoreSignals(void);
180
Martin v. Löwis95292d62002-12-11 14:04:59 +0000181PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000182#endif
Guido van Rossum5c4998b1997-02-14 19:51:34 +0000183
Mark Hammondfe51c6d2002-08-02 02:27:13 +0000184/* Bootstrap */
Martin v. Löwis790465f2008-04-05 20:41:37 +0000185PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
Mark Hammondfe51c6d2002-08-02 02:27:13 +0000186
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000187#ifndef Py_LIMITED_API
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000188/* Use macros for a bunch of old variants */
189#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL)
190#define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL)
191#define PyRun_AnyFileEx(fp, name, closeit) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000192 PyRun_AnyFileExFlags(fp, name, closeit, NULL)
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000193#define PyRun_AnyFileFlags(fp, name, flags) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000194 PyRun_AnyFileExFlags(fp, name, 0, flags)
Mark Hammondf3ddaee2005-10-23 10:53:06 +0000195#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL)
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000196#define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL)
197#define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL)
198#define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL)
199#define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL)
200#define PyRun_File(fp, p, s, g, l) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000201 PyRun_FileExFlags(fp, p, s, g, l, 0, NULL)
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000202#define PyRun_FileEx(fp, p, s, g, l, c) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000203 PyRun_FileExFlags(fp, p, s, g, l, c, NULL)
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000204#define PyRun_FileFlags(fp, p, s, g, l, flags) \
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000205 PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000206#endif
Jeremy Hylton3e0055f2005-10-20 19:59:25 +0000207
Guido van Rossum57d8e3f1997-07-19 19:50:52 +0000208/* In getpath.c */
Martin v. Löwis790465f2008-04-05 20:41:37 +0000209PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
210PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
211PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
212PyAPI_FUNC(wchar_t *) Py_GetPath(void);
Kristján Valur Jónsson3b69db22010-09-27 05:32:54 +0000213PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000214#ifdef MS_WINDOWS
215int _Py_CheckPython3();
216#endif
Guido van Rossum57d8e3f1997-07-19 19:50:52 +0000217
218/* In their own files */
Mark Hammonda2905272002-07-29 13:42:14 +0000219PyAPI_FUNC(const char *) Py_GetVersion(void);
220PyAPI_FUNC(const char *) Py_GetPlatform(void);
221PyAPI_FUNC(const char *) Py_GetCopyright(void);
222PyAPI_FUNC(const char *) Py_GetCompiler(void);
223PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000224#ifndef Py_LIMITED_API
Georg Brandl1ca2e792011-03-05 20:51:24 +0100225PyAPI_FUNC(const char *) _Py_hgidentifier(void);
226PyAPI_FUNC(const char *) _Py_hgversion(void);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000227#endif
Guido van Rossum57d8e3f1997-07-19 19:50:52 +0000228
Guido van Rossum29e46a91997-08-02 02:56:48 +0000229/* Internal -- various one-time initializations */
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000230#ifndef Py_LIMITED_API
Mark Hammond91a681d2002-08-12 07:21:58 +0000231PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
232PyAPI_FUNC(PyObject *) _PySys_Init(void);
233PyAPI_FUNC(void) _PyImport_Init(void);
Brett Cannonfd074152012-04-14 14:10:13 -0400234PyAPI_FUNC(void) _PyExc_Init(PyObject * bltinmod);
Just van Rossum52e14d62002-12-30 22:08:05 +0000235PyAPI_FUNC(void) _PyImportHooks_Init(void);
Neal Norwitzb2501f42002-12-31 03:42:13 +0000236PyAPI_FUNC(int) _PyFrame_Init(void);
Victor Stinner1c8f0592013-07-22 22:24:54 +0200237PyAPI_FUNC(int) _PyFloat_Init(void);
Christian Heimes9c4756e2008-05-26 13:22:05 +0000238PyAPI_FUNC(int) PyByteArray_Init(void);
Antoine Pitrou86838b02012-02-21 19:03:47 +0100239PyAPI_FUNC(void) _PyRandom_Init(void);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000240#endif
Guido van Rossum29e46a91997-08-02 02:56:48 +0000241
Guido van Rossum8e5e4461997-08-12 14:57:21 +0000242/* Various internal finalizers */
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000243#ifndef Py_LIMITED_API
Mark Hammonda2905272002-07-29 13:42:14 +0000244PyAPI_FUNC(void) _PyExc_Fini(void);
245PyAPI_FUNC(void) _PyImport_Fini(void);
246PyAPI_FUNC(void) PyMethod_Fini(void);
247PyAPI_FUNC(void) PyFrame_Fini(void);
248PyAPI_FUNC(void) PyCFunction_Fini(void);
Christian Heimes77c02eb2008-02-09 02:18:51 +0000249PyAPI_FUNC(void) PyDict_Fini(void);
Mark Hammonda2905272002-07-29 13:42:14 +0000250PyAPI_FUNC(void) PyTuple_Fini(void);
Raymond Hettingerfb09f0e2004-10-07 03:58:07 +0000251PyAPI_FUNC(void) PyList_Fini(void);
Raymond Hettingerd7946662005-08-01 21:39:29 +0000252PyAPI_FUNC(void) PySet_Fini(void);
Christian Heimes72b710a2008-05-26 13:28:38 +0000253PyAPI_FUNC(void) PyBytes_Fini(void);
Christian Heimes9c4756e2008-05-26 13:22:05 +0000254PyAPI_FUNC(void) PyByteArray_Fini(void);
Mark Hammonda2905272002-07-29 13:42:14 +0000255PyAPI_FUNC(void) PyFloat_Fini(void);
256PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
Antoine Pitrou5f454a02013-05-06 21:15:57 +0200257PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);
Antoine Pitrou696e0352010-08-08 22:18:46 +0000258PyAPI_FUNC(void) _PyGC_Fini(void);
Antoine Pitrouf34a0cd2011-11-18 20:14:34 +0100259PyAPI_FUNC(void) PySlice_Fini(void);
Antoine Pitrou957a23b2013-05-04 20:45:02 +0200260PyAPI_FUNC(void) _PyType_Fini(void);
Antoine Pitrou4879a962013-08-31 00:26:02 +0200261PyAPI_FUNC(void) _PyRandom_Fini(void);
Antoine Pitrou0d5e52d2011-05-04 20:02:30 +0200262
263PyAPI_DATA(PyThreadState *) _Py_Finalizing;
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000264#endif
Guido van Rossum8e5e4461997-08-12 14:57:21 +0000265
Guido van Rossum3fb1aea1997-08-12 15:14:22 +0000266/* Stuff with no proper home (yet) */
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000267#ifndef Py_LIMITED_API
Serhiy Storchakac6792272013-10-19 21:03:34 +0300268PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000269#endif
Mark Hammond5d546672002-08-12 13:06:35 +0000270PyAPI_DATA(int) (*PyOS_InputHook)(void);
Serhiy Storchakac6792272013-10-19 21:03:34 +0300271PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000272#ifndef Py_LIMITED_API
Jason Tishler0d2a75c2004-08-09 15:02:30 +0000273PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
Martin v. Löwis4d0d4712010-12-03 20:14:31 +0000274#endif
Fredrik Lundh2f15b252000-08-27 19:15:31 +0000275
276/* Stack size, in "pointers" (so we get extra safety margins
277 on 64-bit platforms). On a 32-bit platform, this translates
278 to a 8k margin. */
279#define PYOS_STACK_MARGIN 2048
280
Amaury Forgeot d'Arc3d17a5c2008-06-13 01:09:34 +0000281#if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1300
Fredrik Lundh2f15b252000-08-27 19:15:31 +0000282/* Enable stack checking under Microsoft C */
283#define USE_STACKCHECK
284#endif
285
Jack Jansen275abb32000-08-07 21:00:42 +0000286#ifdef USE_STACKCHECK
Fredrik Lundh2f15b252000-08-27 19:15:31 +0000287/* Check that we aren't overflowing our stack */
Mark Hammond91a681d2002-08-12 07:21:58 +0000288PyAPI_FUNC(int) PyOS_CheckStack(void);
Jack Jansen275abb32000-08-07 21:00:42 +0000289#endif
Guido van Rossum3fb1aea1997-08-12 15:14:22 +0000290
Guido van Rossumc7247ce2000-09-16 16:31:31 +0000291/* Signals */
292typedef void (*PyOS_sighandler_t)(int);
Mark Hammond91a681d2002-08-12 07:21:58 +0000293PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
294PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
Guido van Rossumc7247ce2000-09-16 16:31:31 +0000295
Georg Brandl2daf6ae2012-02-20 19:54:16 +0100296/* Random */
297PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size);
Guido van Rossumc7247ce2000-09-16 16:31:31 +0000298
Guido van Rossuma3309961993-07-28 09:05:47 +0000299#ifdef __cplusplus
300}
301#endif
302#endif /* !Py_PYTHONRUN_H */