Skip to content

Commit 7534530

Browse files
committed
Make extension.c more readable
1 parent d347ce0 commit 7534530

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

softioc/extension.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,8 @@ static struct PyModuleDef softioc_module = {
245245
PyMOD(_extension)
246246
{
247247
#if PY_MAJOR_VERSION >= 3
248-
PyObject *mod = PyModule_Create(&softioc_module);
248+
return PyModule_Create(&softioc_module);
249249
#else
250-
PyObject *mod = Py_InitModule("softioc._extension", softioc_methods);
251-
#endif
252-
if(mod) {
253-
}
254-
#if PY_MAJOR_VERSION >= 3
255-
return mod;
256-
#else
257-
(void)mod;
250+
Py_InitModule("softioc._extension", softioc_methods);
258251
#endif
259252
}

0 commit comments

Comments
 (0)