diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/_warnings.c | 11 | ||||
-rw-r--r-- | Python/getopt.c | 2 | ||||
-rw-r--r-- | Python/graminit.c | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 7472ab68c86..d5c4ebe0296 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -61,7 +61,7 @@ get_warnings_attr(const char *attr) } -PyObject * +static PyObject * get_once_registry(void) { PyObject *registry; @@ -378,16 +378,17 @@ warn_explicit(PyObject *category, PyObject *message, show_warning(filename, lineno, text, category, sourceline); } else { - PyObject *result; + PyObject *res; - result = PyObject_CallFunctionObjArgs(show_fxn, message, category, + res = PyObject_CallFunctionObjArgs(show_fxn, message, category, filename, lineno_obj, Py_None, sourceline ? sourceline: Py_None, NULL); - Py_XDECREF(result); - if (result == NULL) + Py_DECREF(show_fxn); + Py_XDECREF(res); + if (res == NULL) goto cleanup; } } diff --git a/Python/getopt.c b/Python/getopt.c index 1baf8724c24..da9341f404d 100644 --- a/Python/getopt.c +++ b/Python/getopt.c @@ -91,7 +91,7 @@ int _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring) if (option == 'X') { fprintf(stderr, - "-X is reserved for non-standard arguments\n"); + "-X is reserved for implementation-specific arguments\n"); return '_'; } diff --git a/Python/graminit.c b/Python/graminit.c index 081a072966f..e26bcc5e261 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -1,3 +1,5 @@ +/* Generated by Parser/pgen */ + #include "pgenheaders.h" #include "grammar.h" static arc arcs_0_0[3] = { |