Commit 6e00d9cd authored by Manuel Günther's avatar Manuel Günther
Browse files

Removed duplicated constants from c module

parent 454f5b6c
...@@ -1095,15 +1095,10 @@ static PyObject* create_module (void) { ...@@ -1095,15 +1095,10 @@ static PyObject* create_module (void) {
if (!m) return 0; if (!m) return 0;
auto m_ = make_safe(m); ///< protects against early returns auto m_ = make_safe(m); ///< protects against early returns
if (PyModule_AddStringConstant(m, "__version__", BOB_EXT_MODULE_VERSION) < 0)
return 0;
/* imports bob.blitz C-API + dependencies */ /* imports bob.blitz C-API + dependencies */
if (import_bob_blitz() < 0) return 0; if (import_bob_blitz() < 0) return 0;
Py_INCREF(m); return Py_BuildValue("O", m);
return m;
} }
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) { PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
......
...@@ -158,8 +158,7 @@ static PyObject* create_module (void) { ...@@ -158,8 +158,7 @@ static PyObject* create_module (void) {
auto m_ = make_safe(m); ///< protects against early returns auto m_ = make_safe(m); ///< protects against early returns
/* register version numbers and constants */ /* register version numbers and constants */
if (PyModule_AddStringConstant(m, "module", BOB_EXT_MODULE_VERSION) < 0) if (PyModule_AddStringConstant(m, "module", BOB_EXT_MODULE_VERSION) < 0) return 0;
return 0;
PyObject* externals = build_version_dictionary(); PyObject* externals = build_version_dictionary();
if (!externals) return 0; if (!externals) return 0;
...@@ -167,9 +166,7 @@ static PyObject* create_module (void) { ...@@ -167,9 +166,7 @@ static PyObject* create_module (void) {
if (import_bob_blitz() < 0) return 0; if (import_bob_blitz() < 0) return 0;
Py_INCREF(m); return Py_BuildValue("O", m);
return m;
} }
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) { PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment