diff options
author | Ned Deily <nad@acm.org> | 2013-11-03 15:34:37 -0800 |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2013-11-03 15:34:37 -0800 |
commit | 7f06cf08dd67d2c3b5a218cf5427b0453a811308 (patch) | |
tree | 000a3ee4ad784ce011e5bf8bf3e316049a93e85d /Modules/spwdmodule.c | |
parent | 60713979045babcbec3cfeed62429a7d57c88d6e (diff) | |
parent | 01761c88525db30ad9136f4978aaf1451361a5ec (diff) | |
download | cpython-7f06cf08dd67d2c3b5a218cf5427b0453a811308.tar.gz |
Issue #18702 null merge
Diffstat (limited to 'Modules/spwdmodule.c')
-rw-r--r-- | Modules/spwdmodule.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c index 194ae196ba..d06f8cecd1 100644 --- a/Modules/spwdmodule.c +++ b/Modules/spwdmodule.c @@ -196,9 +196,11 @@ PyInit_spwd(void) m=PyModule_Create(&spwdmodule); if (m == NULL) return NULL; - if (!initialized) - PyStructSequence_InitType(&StructSpwdType, - &struct_spwd_type_desc); + if (!initialized) { + if (PyStructSequence_InitType2(&StructSpwdType, + &struct_spwd_type_desc) < 0) + return NULL; + } Py_INCREF((PyObject *) &StructSpwdType); PyModule_AddObject(m, "struct_spwd", (PyObject *) &StructSpwdType); initialized = 1; |