diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-07-14 16:36:31 -0700 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-07-14 19:14:35 -0700 |
commit | 96579d92769c47adbaa00f8407b85f93eb856c66 (patch) | |
tree | 4f378688cdde607476e18a8f30b232cee228efc2 /src/block_template.c | |
parent | 52287434f824732c52ba21b771a9626c312ca4e9 (diff) | |
download | pycrypto-96579d92769c47adbaa00f8407b85f93eb856c66.tar.gz |
Py3k cleanup: PyType_Ready
Diffstat (limited to 'src/block_template.c')
-rw-r--r-- | src/block_template.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/block_template.c b/src/block_template.c index c2c711f..d5e68c1 100644 --- a/src/block_template.c +++ b/src/block_template.c @@ -757,7 +757,6 @@ _MODULE_NAME (void) PyObject *m; #ifdef IS_PY3K - /* PyType_Ready automatically fills in ob_type with &PyType_Type if it's not already set */ if (PyType_Ready(&ALGtype) < 0) return NULL; @@ -766,7 +765,9 @@ _MODULE_NAME (void) if (m == NULL) return NULL; #else - ALGtype.ob_type = &PyType_Type; + if (PyType_Ready(&ALGtype) < 0) + return; + /* Create the module and add the functions */ m = Py_InitModule("Crypto.Cipher." _MODULE_STRING, modulemethods); #endif |