From ac33d35632ad127e7a27d10c7e7bee2e8a70496f Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 11 Aug 2015 10:42:22 +0100 Subject: [PATCH] [brotlimodule.cc] add __version__ string attribute to brotli module --- python/brotlimodule.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/brotlimodule.cc b/python/brotlimodule.cc index 066219c..4294664 100644 --- a/python/brotlimodule.cc +++ b/python/brotlimodule.cc @@ -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; }