mirror of
https://github.com/python/cpython.git
synced 2026-01-27 09:42:08 +00:00
Applied patch #2617 from Frank Wierzbicki wit some extras from me
-J and -X are now reserved for Jython and non-standard arguments (e.g. IronPython). I've added some extra comments to make sure the reservation don't get missed in the future.
This commit is contained in:
parent
d3ed492164
commit
7a98d2730c
3 changed files with 20 additions and 2 deletions
|
|
@ -80,7 +80,18 @@ int _PyOS_GetOpt(int argc, char **argv, char *optstring)
|
|||
|
||||
if ( (option = *opt_ptr++) == '\0')
|
||||
return -1;
|
||||
|
||||
|
||||
if (option == 'J') {
|
||||
fprintf(stderr, "-J is reserved for Jython\n");
|
||||
return '_';
|
||||
}
|
||||
|
||||
if (option == 'X') {
|
||||
fprintf(stderr,
|
||||
"-X is reserved for non-standard arguments\n");
|
||||
return '_';
|
||||
}
|
||||
|
||||
if ((ptr = strchr(optstring, option)) == NULL) {
|
||||
if (_PyOS_opterr)
|
||||
fprintf(stderr, "Unknown option: -%c\n", option);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue