Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 5415:596380a567d2 legacy-trunk
Keep MS compiler happy: use (int)strlen() when comparing; make sure
not to use kill().
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 06 May 1997 15:24:59 +0000 |
| parents | b7871ca930ad |
| children | e926c331ebbf |
line wrap: on
line diff
--- a/Python/pythonrun.c Tue May 06 15:23:24 1997 +0000 +++ b/Python/pythonrun.c Tue May 06 15:24:59 1997 +0000 @@ -57,6 +57,12 @@ #include "windows.h" #endif +#ifdef HAVE_GETPID +#ifndef MS_WINDOWS +#define HAVE_KILL +#endif +#endif + extern char *Py_GetPath(); extern grammar _PyParser_Grammar; /* From graminit.c */ @@ -370,7 +376,7 @@ if (text != NULL) { char *nl; if (offset > 0 && - offset == strlen(text)) + offset == (int)strlen(text)) offset--; for (;;) { nl = strchr(text, '\n'); @@ -728,7 +734,7 @@ { signal(sig, SIG_DFL); /* Don't catch recursive signals */ Py_Cleanup(); /* Do essential clean-up */ -#ifdef HAVE_GETPID +#ifdef HAVE_KILL kill(getpid(), sig); /* Pretend the signal killed us */ #else exit(1);
