Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f42d32c commit 88c9344Copy full SHA for 88c9344
1 file changed
Modules/pwdmodule.c
@@ -159,9 +159,9 @@ DL_EXPORT(void)
159
initpwd(void)
160
{
161
PyObject *m, *d;
162
- m = Py_InitModule4("pwd", pwd_methods, pwd__doc__,
163
- (PyObject *)NULL, PYTHON_API_VERSION);
164
- d = PyModule_GetDict(m);
+ m = Py_InitModule3("pwd", pwd_methods, pwd__doc__);
+
165
PyStructSequence_InitType(&StructPwdType, &struct_pwd_type_desc);
166
- PyDict_SetItemString(d, "struct_pwent", (PyObject *) &StructPwdType);
+ Py_INCREF((PyObject *) &StructPwdType);
+ PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType);
167
}
0 commit comments