Commit 98e07d1d authored by André Anjos's avatar André Anjos 💬

Use make_safe()

parent 498f7977
......@@ -90,31 +90,13 @@ static PyObject* build_version_dictionary() {
PyObject* retval = PyDict_New();
if (!retval) return 0;
auto retval_ = make_safe(retval);
if (!dict_steal(retval, "Boost", boost_version())) {
Py_DECREF(retval);
return 0;
}
if (!dict_steal(retval, "Compiler", compiler_version())) {
Py_DECREF(retval);
return 0;
}
if (!dict_steal(retval, "Python", python_version())) {
Py_DECREF(retval);
return 0;
}
if (!dict_steal(retval, "Bob", bob_version())) {
Py_DECREF(retval);
return 0;
}
if (!dict_steal(retval, "NumPy", numpy_version())) {
Py_DECREF(retval);
return 0;
}
if (!dict_steal(retval, "Boost", boost_version())) return 0;
if (!dict_steal(retval, "Compiler", compiler_version())) return 0;
if (!dict_steal(retval, "Python", python_version())) return 0;
if (!dict_steal(retval, "Bob", bob_version())) return 0;
if (!dict_steal(retval, "NumPy", numpy_version())) return 0;
return retval;
}
......
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