Mercurial > cpython-lru_cache-weakref
comparison Python/pythonmain.c @ 1910:35947f60528e legacy-trunk
* Python/pythonmain.c: fatal error if can't alloc mem for -c
string
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 29 Sep 1994 09:38:18 +0000 |
| parents | b724599401ff |
| children | d0d0a69b5ca3 |
comparison
equal
deleted
inserted
replaced
| 1909:0c232194a64f | 1910:35947f60528e |
|---|---|
| 69 if (c == 'c') { | 69 if (c == 'c') { |
| 70 /* -c is the last option; following arguments | 70 /* -c is the last option; following arguments |
| 71 that look like options are left for the | 71 that look like options are left for the |
| 72 the command to interpret. */ | 72 the command to interpret. */ |
| 73 command = malloc(strlen(optarg) + 2); | 73 command = malloc(strlen(optarg) + 2); |
| 74 /* Ignore malloc errors this early... */ | 74 if (command == NULL) |
| 75 fatal("not enough memory to copy -c argument"); | |
| 75 strcpy(command, optarg); | 76 strcpy(command, optarg); |
| 76 strcat(command, "\n"); | 77 strcat(command, "\n"); |
| 77 break; | 78 break; |
| 78 } | 79 } |
| 79 | 80 |
