diff Python/_warnings.c @ 71221:a8be035f299f 2.7

start out this branch always with filename NULL
author Benjamin Peterson <benjamin@python.org>
date Mon, 04 Jul 2011 22:27:16 -0500
parents a2944dd4ba7b
children
line wrap: on
line diff
--- a/Python/_warnings.c	Mon Jul 04 12:50:02 2011 -0700
+++ b/Python/_warnings.c	Mon Jul 04 22:27:16 2011 -0500
@@ -514,7 +514,7 @@
     }
     else {
         const char *module_str = PyString_AsString(*module);
-        Py_XDECREF(*filename);
+        *filename = NULL;
         if (module_str && strcmp(module_str, "__main__") == 0) {
             PyObject *argv = PySys_GetObject("argv");
             if (argv != NULL && PyList_Size(argv) > 0) {