mirror of
https://github.com/google/brotli.git
synced 2025-01-13 18:00:07 +00:00
brotlimodule.cc: fix error with clang ('expected a class or namespace')
This commit is contained in:
parent
8b2ca8efd9
commit
912b0ac2c4
@ -21,9 +21,9 @@ static int mode_convertor(PyObject *o, BrotliParams::Mode *mode) {
|
||||
}
|
||||
|
||||
*mode = (BrotliParams::Mode) PyInt_AsLong(o);
|
||||
if (*mode != BrotliParams::Mode::MODE_GENERIC &&
|
||||
*mode != BrotliParams::Mode::MODE_TEXT &&
|
||||
*mode != BrotliParams::Mode::MODE_FONT) {
|
||||
if (*mode != BrotliParams::MODE_GENERIC &&
|
||||
*mode != BrotliParams::MODE_TEXT &&
|
||||
*mode != BrotliParams::MODE_FONT) {
|
||||
PyErr_SetString(BrotliError, "Invalid mode");
|
||||
return 0;
|
||||
}
|
||||
@ -240,9 +240,9 @@ PyMODINIT_FUNC INIT_BROTLI(void) {
|
||||
PyModule_AddObject(m, "error", BrotliError);
|
||||
}
|
||||
|
||||
PyModule_AddIntConstant(m, "MODE_GENERIC", (int) BrotliParams::Mode::MODE_GENERIC);
|
||||
PyModule_AddIntConstant(m, "MODE_TEXT", (int) BrotliParams::Mode::MODE_TEXT);
|
||||
PyModule_AddIntConstant(m, "MODE_FONT", (int) BrotliParams::Mode::MODE_FONT);
|
||||
PyModule_AddIntConstant(m, "MODE_GENERIC", (int) BrotliParams::MODE_GENERIC);
|
||||
PyModule_AddIntConstant(m, "MODE_TEXT", (int) BrotliParams::MODE_TEXT);
|
||||
PyModule_AddIntConstant(m, "MODE_FONT", (int) BrotliParams::MODE_FONT);
|
||||
|
||||
PyModule_AddStringConstant(m, "__version__", BROTLI_VERSION);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user