[brotlimodule.cc] add __version__ string attribute to brotli module

This commit is contained in:
Cosimo Lupo 2015-08-11 10:42:22 +01:00
parent 54baf43c70
commit ac33d35632

View File

@ -9,6 +9,8 @@
#define PyInt_AsLong PyLong_AsLong
#endif
#define BROTLI_VERSION "0.1.0"
using namespace brotli;
static PyObject *BrotliError;
@ -243,5 +245,7 @@ PyMODINIT_FUNC INIT_BROTLI(void) {
PyModule_AddIntConstant(m, "MODE_TEXT", (int) BrotliParams::Mode::MODE_TEXT);
PyModule_AddIntConstant(m, "MODE_FONT", (int) BrotliParams::Mode::MODE_FONT);
PyModule_AddStringConstant(m, "__version__", BROTLI_VERSION);
RETURN_BROTLI;
}