From d449eab1e45d2f532f9eb6c7d35545f2d9a5248a Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 22 May 2003 16:32:58 +0000 Subject: [PATCH] Fixed dotted name assertion. --- Modules/itertoolsmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index b52f34923ad..20461a71581 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1832,9 +1832,9 @@ inititertools(void) for (i=0 ; typelist[i] != NULL ; i++) { if (PyType_Ready(typelist[i]) < 0) return; - name = strchr(typelist[i]->tp_name, '.') + 1; + name = strchr(typelist[i]->tp_name, '.'); assert (name != NULL); Py_INCREF(typelist[i]); - PyModule_AddObject(m, name, (PyObject *)typelist[i]); + PyModule_AddObject(m, name+1, (PyObject *)typelist[i]); } }