Commit 0a56a83e authored by Michael Tremer's avatar Michael Tremer

python: Use shorthand function to export __version__

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 24ca7992
......@@ -110,10 +110,8 @@ PyMODINIT_FUNC PyInit_location(void) {
PyModule_AddObject(m, "Writer", (PyObject *)&WriterType);
// Add constants
PyObject* d = PyModule_GetDict(m);
// Version
PyDict_SetItemString(d, "__version__", PyUnicode_FromString(VERSION));
if (PyModule_AddStringConstant(m, "__version__", VERSION))
return NULL;
// Add flags
if (PyModule_AddIntConstant(m, "FLAG_ANONYMOUS_PROXY", LOC_NETWORK_FLAG_ANONYMOUS_PROXY))
......
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