aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/_brotli.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/_brotli.cc b/python/_brotli.cc
index d4075bd..54c7363 100644
--- a/python/_brotli.cc
+++ b/python/_brotli.cc
@@ -2,11 +2,12 @@
#include <Python.h>
#include <bytesobject.h>
#include <structmember.h>
-#include <vector>
-#include "../common/version.h"
+
#include <brotli/decode.h>
#include <brotli/encode.h>
+#include <vector>
+
#if PY_MAJOR_VERSION >= 3
#define PyInt_Check PyLong_Check
#define PyInt_AsLong PyLong_AsLong
@@ -745,8 +746,9 @@ PyMODINIT_FUNC INIT_BROTLI(void) {
PyModule_AddIntConstant(m, "MODE_FONT", (int) BROTLI_MODE_FONT);
char version[16];
+ uint32_t decoderVersion = BrotliDecoderVersion();
snprintf(version, sizeof(version), "%d.%d.%d",
- BROTLI_VERSION >> 24, (BROTLI_VERSION >> 12) & 0xFFF, BROTLI_VERSION & 0xFFF);
+ decoderVersion >> 24, (decoderVersion >> 12) & 0xFFF, decoderVersion & 0xFFF);
PyModule_AddStringConstant(m, "__version__", version);
RETURN_BROTLI;