mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-07 13:25:24 +03:00
Merge pull request #140 from radarhere/simd-init
Corrected return types
This commit is contained in:
commit
b55da8020e
|
@ -128,7 +128,7 @@ features = {
|
||||||
"libjpeg_turbo": ("PIL._imaging", "HAVE_LIBJPEGTURBO", "libjpeg_turbo_version"),
|
"libjpeg_turbo": ("PIL._imaging", "HAVE_LIBJPEGTURBO", "libjpeg_turbo_version"),
|
||||||
"libimagequant": ("PIL._imaging", "HAVE_LIBIMAGEQUANT", "imagequant_version"),
|
"libimagequant": ("PIL._imaging", "HAVE_LIBIMAGEQUANT", "imagequant_version"),
|
||||||
"xcb": ("PIL._imaging", "HAVE_XCB", None),
|
"xcb": ("PIL._imaging", "HAVE_XCB", None),
|
||||||
"acceleration": ("PIL._imaging", "acceleration", "acceleration"),
|
"acceleration": ("PIL._imaging", "HAVE_ACCELERATION", "acceleration"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4407,6 +4407,7 @@ setup_module(PyObject *m) {
|
||||||
Py_INCREF(have_xcb);
|
Py_INCREF(have_xcb);
|
||||||
PyModule_AddObject(m, "HAVE_XCB", have_xcb);
|
PyModule_AddObject(m, "HAVE_XCB", have_xcb);
|
||||||
|
|
||||||
|
PyObject *have_acceleration = Py_True;
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
PyModule_AddStringConstant(m, "acceleration", "avx2");
|
PyModule_AddStringConstant(m, "acceleration", "avx2");
|
||||||
#elif defined(__SSE4__)
|
#elif defined(__SSE4__)
|
||||||
|
@ -4416,9 +4417,13 @@ setup_module(PyObject *m) {
|
||||||
#elif defined(__NEON__)
|
#elif defined(__NEON__)
|
||||||
PyModule_AddStringConstant(m, "acceleration", "neon");
|
PyModule_AddStringConstant(m, "acceleration", "neon");
|
||||||
#else
|
#else
|
||||||
Py_INCREF(Py_False);
|
Py_INCREF(Py_None);
|
||||||
PyModule_AddObject(m, "acceleration", Py_False);
|
PyModule_AddObject(m, "acceleration", Py_None);
|
||||||
|
|
||||||
|
have_acceleration = Py_False;
|
||||||
#endif
|
#endif
|
||||||
|
Py_INCREF(have_acceleration);
|
||||||
|
PyModule_AddObject(m, "HAVE_ACCELERATION", have_acceleration);
|
||||||
|
|
||||||
PyObject *pillow_version = PyUnicode_FromString(version);
|
PyObject *pillow_version = PyUnicode_FromString(version);
|
||||||
PyDict_SetItemString(
|
PyDict_SetItemString(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user