Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(164648)

Delta Between Two Patch Sets: Include/pythonrun.h

Issue 11619: On Windows, don't encode filenames in the import machinery
Left Patch Set: Created 8 years, 7 months ago
Right Patch Set: Created 6 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Include/pyerrors.h ('k') | Include/symtable.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 1
2 /* Interfaces to parse and execute pieces of python code */ 2 /* Interfaces to parse and execute pieces of python code */
3 3
4 #ifndef Py_PYTHONRUN_H 4 #ifndef Py_PYTHONRUN_H
5 #define Py_PYTHONRUN_H 5 #define Py_PYTHONRUN_H
6 #ifdef __cplusplus 6 #ifdef __cplusplus
7 extern "C" { 7 extern "C" {
8 #endif 8 #endif
9 9
10 #define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \ 10 #define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
(...skipping 12 matching lines...) Expand all
23 #endif 23 #endif
24 24
25 PyAPI_FUNC(void) Py_SetProgramName(wchar_t *); 25 PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
26 PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); 26 PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
27 27
28 PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *); 28 PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
29 PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void); 29 PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
30 30
31 PyAPI_FUNC(void) Py_Initialize(void); 31 PyAPI_FUNC(void) Py_Initialize(void);
32 PyAPI_FUNC(void) Py_InitializeEx(int); 32 PyAPI_FUNC(void) Py_InitializeEx(int);
33 #ifndef Py_LIMITED_API
34 PyAPI_FUNC(void) _Py_InitializeEx_Private(int, int);
35 #endif
33 PyAPI_FUNC(void) Py_Finalize(void); 36 PyAPI_FUNC(void) Py_Finalize(void);
34 PyAPI_FUNC(int) Py_IsInitialized(void); 37 PyAPI_FUNC(int) Py_IsInitialized(void);
35 PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void); 38 PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
36 PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *); 39 PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
37 40
38 #ifndef Py_LIMITED_API 41 #ifndef Py_LIMITED_API
39 PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); 42 PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
40 PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); 43 PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
41 PyAPI_FUNC(int) PyRun_AnyFileExFlags( 44 PyAPI_FUNC(int) PyRun_AnyFileExFlags(
42 FILE *fp, 45 FILE *fp,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 PyArena *arena); 94 PyArena *arena);
92 #endif 95 #endif
93 96
94 #ifndef PyParser_SimpleParseString 97 #ifndef PyParser_SimpleParseString
95 #define PyParser_SimpleParseString(S, B) \ 98 #define PyParser_SimpleParseString(S, B) \
96 PyParser_SimpleParseStringFlags(S, B, 0) 99 PyParser_SimpleParseStringFlags(S, B, 0)
97 #define PyParser_SimpleParseFile(FP, S, B) \ 100 #define PyParser_SimpleParseFile(FP, S, B) \
98 PyParser_SimpleParseFileFlags(FP, S, B, 0) 101 PyParser_SimpleParseFileFlags(FP, S, B, 0)
99 #endif 102 #endif
100 PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int, 103 PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int,
101 int); 104 int);
105 PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlagsFilename(const char *,
106 const char *,
107 int, int);
102 PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *, 108 PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *,
103 int, int); 109 int, int);
104 110
105 #ifndef Py_LIMITED_API 111 #ifndef Py_LIMITED_API
106 PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *, 112 PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
107 PyObject *, PyCompilerFlags *); 113 PyObject *, PyCompilerFlags *);
108 114
109 PyAPI_FUNC(PyObject *) PyRun_FileExFlags( 115 PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
110 FILE *fp, 116 FILE *fp,
111 const char *filename, /* decoded from the filesystem encoding */ 117 const char *filename, /* decoded from the filesystem encoding */
112 int start, 118 int start,
113 PyObject *globals, 119 PyObject *globals,
(...skipping 10 matching lines...) Expand all
124 PyAPI_FUNC(PyObject *) Py_CompileStringExFlags( 130 PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
125 const char *str, 131 const char *str,
126 const char *filename, /* decoded from the filesystem encoding */ 132 const char *filename, /* decoded from the filesystem encoding */
127 int start, 133 int start,
128 PyCompilerFlags *flags, 134 PyCompilerFlags *flags,
129 int optimize); 135 int optimize);
130 #endif 136 #endif
131 PyAPI_FUNC(struct symtable *) Py_SymtableString( 137 PyAPI_FUNC(struct symtable *) Py_SymtableString(
132 const char *str, 138 const char *str,
133 const char *filename, /* decoded from the filesystem encoding */ 139 const char *filename, /* decoded from the filesystem encoding */
140 int start);
141 PyAPI_FUNC(struct symtable *) Py_SymtableStringObject(
142 const char *str,
143 PyObject *filename,
134 int start); 144 int start);
135 145
136 PyAPI_FUNC(void) PyErr_Print(void); 146 PyAPI_FUNC(void) PyErr_Print(void);
137 PyAPI_FUNC(void) PyErr_PrintEx(int); 147 PyAPI_FUNC(void) PyErr_PrintEx(int);
138 PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); 148 PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
139 149
140 /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level 150 /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
141 * exit functions. 151 * exit functions.
142 */ 152 */
143 #ifndef Py_LIMITED_API 153 #ifndef Py_LIMITED_API
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 #ifndef Py_LIMITED_API 207 #ifndef Py_LIMITED_API
198 PyAPI_FUNC(const char *) _Py_hgidentifier(void); 208 PyAPI_FUNC(const char *) _Py_hgidentifier(void);
199 PyAPI_FUNC(const char *) _Py_hgversion(void); 209 PyAPI_FUNC(const char *) _Py_hgversion(void);
200 #endif 210 #endif
201 211
202 /* Internal -- various one-time initializations */ 212 /* Internal -- various one-time initializations */
203 #ifndef Py_LIMITED_API 213 #ifndef Py_LIMITED_API
204 PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void); 214 PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
205 PyAPI_FUNC(PyObject *) _PySys_Init(void); 215 PyAPI_FUNC(PyObject *) _PySys_Init(void);
206 PyAPI_FUNC(void) _PyImport_Init(void); 216 PyAPI_FUNC(void) _PyImport_Init(void);
207 PyAPI_FUNC(void) _PyExc_Init(void); 217 PyAPI_FUNC(void) _PyExc_Init(PyObject * bltinmod);
208 PyAPI_FUNC(void) _PyImportHooks_Init(void); 218 PyAPI_FUNC(void) _PyImportHooks_Init(void);
209 PyAPI_FUNC(int) _PyFrame_Init(void); 219 PyAPI_FUNC(int) _PyFrame_Init(void);
210 PyAPI_FUNC(void) _PyFloat_Init(void); 220 PyAPI_FUNC(int) _PyFloat_Init(void);
211 PyAPI_FUNC(int) PyByteArray_Init(void); 221 PyAPI_FUNC(int) PyByteArray_Init(void);
222 PyAPI_FUNC(void) _PyRandom_Init(void);
212 #endif 223 #endif
213 224
214 /* Various internal finalizers */ 225 /* Various internal finalizers */
215 #ifndef Py_LIMITED_API 226 #ifndef Py_LIMITED_API
216 PyAPI_FUNC(void) _PyExc_Fini(void); 227 PyAPI_FUNC(void) _PyExc_Fini(void);
217 PyAPI_FUNC(void) _PyImport_Fini(void); 228 PyAPI_FUNC(void) _PyImport_Fini(void);
218 PyAPI_FUNC(void) PyMethod_Fini(void); 229 PyAPI_FUNC(void) PyMethod_Fini(void);
219 PyAPI_FUNC(void) PyFrame_Fini(void); 230 PyAPI_FUNC(void) PyFrame_Fini(void);
220 PyAPI_FUNC(void) PyCFunction_Fini(void); 231 PyAPI_FUNC(void) PyCFunction_Fini(void);
221 PyAPI_FUNC(void) PyDict_Fini(void); 232 PyAPI_FUNC(void) PyDict_Fini(void);
222 PyAPI_FUNC(void) PyTuple_Fini(void); 233 PyAPI_FUNC(void) PyTuple_Fini(void);
223 PyAPI_FUNC(void) PyList_Fini(void); 234 PyAPI_FUNC(void) PyList_Fini(void);
224 PyAPI_FUNC(void) PySet_Fini(void); 235 PyAPI_FUNC(void) PySet_Fini(void);
225 PyAPI_FUNC(void) PyBytes_Fini(void); 236 PyAPI_FUNC(void) PyBytes_Fini(void);
226 PyAPI_FUNC(void) PyByteArray_Fini(void); 237 PyAPI_FUNC(void) PyByteArray_Fini(void);
227 PyAPI_FUNC(void) PyFloat_Fini(void); 238 PyAPI_FUNC(void) PyFloat_Fini(void);
228 PyAPI_FUNC(void) PyOS_FiniInterrupts(void); 239 PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
240 PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);
229 PyAPI_FUNC(void) _PyGC_Fini(void); 241 PyAPI_FUNC(void) _PyGC_Fini(void);
242 PyAPI_FUNC(void) PySlice_Fini(void);
243 PyAPI_FUNC(void) _PyType_Fini(void);
244
245 PyAPI_DATA(PyThreadState *) _Py_Finalizing;
230 #endif 246 #endif
231 247
232 /* Stuff with no proper home (yet) */ 248 /* Stuff with no proper home (yet) */
233 #ifndef Py_LIMITED_API 249 #ifndef Py_LIMITED_API
234 PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, char *); 250 PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, char *);
235 #endif 251 #endif
236 PyAPI_DATA(int) (*PyOS_InputHook)(void); 252 PyAPI_DATA(int) (*PyOS_InputHook)(void);
237 PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *); 253 PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *);
238 #ifndef Py_LIMITED_API 254 #ifndef Py_LIMITED_API
239 PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState; 255 PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
(...skipping 12 matching lines...) Expand all
252 #ifdef USE_STACKCHECK 268 #ifdef USE_STACKCHECK
253 /* Check that we aren't overflowing our stack */ 269 /* Check that we aren't overflowing our stack */
254 PyAPI_FUNC(int) PyOS_CheckStack(void); 270 PyAPI_FUNC(int) PyOS_CheckStack(void);
255 #endif 271 #endif
256 272
257 /* Signals */ 273 /* Signals */
258 typedef void (*PyOS_sighandler_t)(int); 274 typedef void (*PyOS_sighandler_t)(int);
259 PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int); 275 PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
260 PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t); 276 PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
261 277
278 /* Random */
279 PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size);
262 280
263 #ifdef __cplusplus 281 #ifdef __cplusplus
264 } 282 }
265 #endif 283 #endif
266 #endif /* !Py_PYTHONRUN_H */ 284 #endif /* !Py_PYTHONRUN_H */
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+