contrib/python-zstandard/c-ext/constants.c
changeset 30822 b54a2984cdd4
parent 30435 b86a448a2965
child 31796 e0dc40530c5a
equal deleted inserted replaced
30821:7005c03f7387 30822:b54a2984cdd4
    30 	Py_INCREF(version);
    30 	Py_INCREF(version);
    31 	PyModule_AddObject(mod, "__version__", version);
    31 	PyModule_AddObject(mod, "__version__", version);
    32 
    32 
    33 	ZstdError = PyErr_NewException("zstd.ZstdError", NULL, NULL);
    33 	ZstdError = PyErr_NewException("zstd.ZstdError", NULL, NULL);
    34 	PyModule_AddObject(mod, "ZstdError", ZstdError);
    34 	PyModule_AddObject(mod, "ZstdError", ZstdError);
       
    35 
       
    36 	PyModule_AddIntConstant(mod, "COMPRESSOBJ_FLUSH_FINISH", compressorobj_flush_finish);
       
    37 	PyModule_AddIntConstant(mod, "COMPRESSOBJ_FLUSH_BLOCK", compressorobj_flush_block);
    35 
    38 
    36 	/* For now, the version is a simple tuple instead of a dedicated type. */
    39 	/* For now, the version is a simple tuple instead of a dedicated type. */
    37 	zstdVersion = PyTuple_New(3);
    40 	zstdVersion = PyTuple_New(3);
    38 	PyTuple_SetItem(zstdVersion, 0, PyLong_FromLong(ZSTD_VERSION_MAJOR));
    41 	PyTuple_SetItem(zstdVersion, 0, PyLong_FromLong(ZSTD_VERSION_MAJOR));
    39 	PyTuple_SetItem(zstdVersion, 1, PyLong_FromLong(ZSTD_VERSION_MINOR));
    42 	PyTuple_SetItem(zstdVersion, 1, PyLong_FromLong(ZSTD_VERSION_MINOR));