fix module init return values and type initializers and unicode/bytes conversions
diff --git a/OpenSSL/ssl/ssl.c b/OpenSSL/ssl/ssl.c
index 00b9617..8ac4420 100644
--- a/OpenSSL/ssl/ssl.c
+++ b/OpenSSL/ssl/ssl.c
@@ -84,7 +84,7 @@
module = Py_InitModule3("SSL", ssl_methods, ssl_doc);
#endif
if (module == NULL) {
- return NULL;
+ PyOpenSSL_MODRETURN(NULL);
}
#ifndef PY3
@@ -196,14 +196,9 @@
_pyOpenSSL_tstate_key = PyThread_create_key();
#endif
-#ifdef PY3
- return module;
-#endif
+ PyOpenSSL_MODRETURN(module);
error:
-#ifdef PY3
- return NULL;
-#else
+ PyOpenSSL_MODRETURN(NULL);
;
-#endif
}