comparison Python/_warnings.c @ 71178:f0382acebfe6 3.2

plug refleak
author Benjamin Peterson <benjamin@python.org>
date Sun, 03 Jul 2011 22:18:34 -0500
parents ac18e70cbe7e
children 7eb85a23cf3d
comparison
equal deleted inserted replaced
71176:301c008dd58d 71178:f0382acebfe6
515 else 515 else
516 Py_INCREF(*filename); 516 Py_INCREF(*filename);
517 } 517 }
518 else { 518 else {
519 const char *module_str = _PyUnicode_AsString(*module); 519 const char *module_str = _PyUnicode_AsString(*module);
520 Py_XDECREF(*filename);
520 if (module_str == NULL) 521 if (module_str == NULL)
521 goto handle_error; 522 goto handle_error;
522 if (strcmp(module_str, "__main__") == 0) { 523 if (strcmp(module_str, "__main__") == 0) {
523 PyObject *argv = PySys_GetObject("argv"); 524 PyObject *argv = PySys_GetObject("argv");
524 if (argv != NULL && PyList_Size(argv) > 0) { 525 if (argv != NULL && PyList_Size(argv) > 0) {