diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-05-03 01:02:41 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-05-03 01:02:41 (GMT) |
commit | ab9cc1b7ad87f4f6d921ce9599aaeb6a1839fe3b (patch) | |
tree | 560daf74e86730b0969891ee744fe2fa6f555069 /Python/_warnings.c | |
parent | 56fcb0bc290376351d958e7d55e88ecff14ee0c4 (diff) | |
download | cpython-ab9cc1b7ad87f4f6d921ce9599aaeb6a1839fe3b.zip cpython-ab9cc1b7ad87f4f6d921ce9599aaeb6a1839fe3b.tar.gz cpython-ab9cc1b7ad87f4f6d921ce9599aaeb6a1839fe3b.tar.bz2 |
Fix some indentation errors.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 8f575ca..3477fb1 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -462,9 +462,9 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno, /* Setup filename. */ *filename = PyDict_GetItemString(globals, "__file__"); if (*filename != NULL) { - Py_ssize_t len = PyString_Size(*filename); + Py_ssize_t len = PyString_Size(*filename); const char *file_str = PyString_AsString(*filename); - if (file_str == NULL || (len < 0 && PyErr_Occurred())) + if (file_str == NULL || (len < 0 && PyErr_Occurred())) goto handle_error; /* if filename.lower().endswith((".pyc", ".pyo")): */ @@ -473,12 +473,13 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno, tolower(file_str[len-3]) == 'p' && tolower(file_str[len-2]) == 'y' && (tolower(file_str[len-1]) == 'c' || - tolower(file_str[len-1]) == 'o')) { + tolower(file_str[len-1]) == 'o')) + { *filename = PyString_FromStringAndSize(file_str, len-1); - if (*filename == NULL) - goto handle_error; - } - else + if (*filename == NULL) + goto handle_error; + } + else Py_INCREF(*filename); } else { @@ -492,8 +493,8 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno, else { /* embedded interpreters don't have sys.argv, see bug #839151 */ *filename = PyString_FromString("__main__"); - if (*filename == NULL) - goto handle_error; + if (*filename == NULL) + goto handle_error; } } if (*filename == NULL) { |