summaryrefslogtreecommitdiffstats
path: root/Modules/pwdmodule.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-05-04 22:25:21 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-05-04 22:25:21 (GMT)
commite04b627a116b4fed8fd76f9376ef53592c49d183 (patch)
treed34fbf300c14d372370177e81d3e3cab48999d55 /Modules/pwdmodule.c
parentec75312eaafd6535347378179c657fca9e021e0b (diff)
downloadcpython-e04b627a116b4fed8fd76f9376ef53592c49d183.zip
cpython-e04b627a116b4fed8fd76f9376ef53592c49d183.tar.gz
cpython-e04b627a116b4fed8fd76f9376ef53592c49d183.tar.bz2
remove old undocumented compat interfaces in hashlib and pwd #5881
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r--Modules/pwdmodule.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index cb99183..061a0a5 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -203,13 +203,12 @@ PyInit_pwd(void)
if (m == NULL)
return NULL;
- if (!initialized)
+ if (!initialized) {
PyStructSequence_InitType(&StructPwdType,
&struct_pwd_type_desc);
+ initialized = 1;
+ }
Py_INCREF((PyObject *) &StructPwdType);
PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType);
- /* And for b/w compatibility (this was defined by mistake): */
- PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType);
- initialized = 1;
return m;
}