Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 14278:fb8fb53a2eff legacy-trunk
Add a comment explaining the return value of PyOS_CheckStack().
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 31 Aug 2000 05:38:39 +0000 |
| parents | 396b4ab3b9c2 |
| children | 68b61aa1aa4a |
comparison
equal
deleted
inserted
replaced
| 14277:984abd20eec2 | 14278:fb8fb53a2eff |
|---|---|
| 901 run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals) | 901 run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals) |
| 902 { | 902 { |
| 903 PyCodeObject *co; | 903 PyCodeObject *co; |
| 904 PyObject *v; | 904 PyObject *v; |
| 905 long magic; | 905 long magic; |
| 906 long PyImport_GetMagicNumber(); | 906 long PyImport_GetMagicNumber(void); |
| 907 | 907 |
| 908 magic = PyMarshal_ReadLongFromFile(fp); | 908 magic = PyMarshal_ReadLongFromFile(fp); |
| 909 if (magic != PyImport_GetMagicNumber()) { | 909 if (magic != PyImport_GetMagicNumber()) { |
| 910 PyErr_SetString(PyExc_RuntimeError, | 910 PyErr_SetString(PyExc_RuntimeError, |
| 911 "Bad magic number in .pyc file"); | 911 "Bad magic number in .pyc file"); |
| 1199 /* Stack checking for Microsoft C */ | 1199 /* Stack checking for Microsoft C */ |
| 1200 | 1200 |
| 1201 #include <malloc.h> | 1201 #include <malloc.h> |
| 1202 #include <excpt.h> | 1202 #include <excpt.h> |
| 1203 | 1203 |
| 1204 /* | |
| 1205 * Return non-zero when we run out of memory on the stack; zero otherwise. | |
| 1206 */ | |
| 1204 int | 1207 int |
| 1205 PyOS_CheckStack() | 1208 PyOS_CheckStack() |
| 1206 { | 1209 { |
| 1207 __try { | 1210 __try { |
| 1208 /* _alloca throws a stack overflow exception if there's | 1211 /* _alloca throws a stack overflow exception if there's |
