]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Michael Hudson pointed out that the Dialect_Type object isn't INCREF'd. Why
authorSkip Montanaro <skip@pobox.com>
Wed, 15 Jun 2005 13:35:08 +0000 (13:35 +0000)
committerSkip Montanaro <skip@pobox.com>
Wed, 15 Jun 2005 13:35:08 +0000 (13:35 +0000)
this worked is a bit mystical.  Perhaps it never gets freed because the
object just happens never to be DECREF'd (but that seems unlikely).

Modules/_csv.c

index 79870c0490837ce4cdc6ec9d367f5e4792c542ca..da5ae0d238d6774b9a46f73d3e43b50591e0bfa2 100644 (file)
@@ -1587,6 +1587,7 @@ init_csv(void)
        }
 
         /* Add the Dialect type */
+       Py_INCREF(&Dialect_Type);
         if (PyModule_AddObject(module, "Dialect", (PyObject *)&Dialect_Type))
                 return;