Fix C extension build warnings
Today in "why did we ever do this?", we discover we've vendored code from PIL/Pillow, but PIL/Pillow moved some macro definitions around, so now our vendored code conflicted with their macros that they included in the headers we're including. The solution is to throw out our vendored macros and update the semantics in our vendored Draw.c. I'm not sure why we vendored it, but we seemingly did remove some stuff from it to avoid having to pull in all of PIL/Pillow.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
// increment this value if you've made a change to the c extesion
|
||||
// and want to force users to rebuild
|
||||
#define OVERVIEWER_EXTENSION_VERSION 54
|
||||
#define OVERVIEWER_EXTENSION_VERSION 55
|
||||
|
||||
/* Python PIL, and numpy headers */
|
||||
#include <Python.h>
|
||||
@@ -42,11 +42,6 @@
|
||||
/* Fix Pillow on mingw-w64 which includes windows.h in Imaging.h */
|
||||
#undef TRANSPARENT
|
||||
|
||||
/* like (a * b + 127) / 255), but much faster on most platforms
|
||||
from PIL's _imaging.c */
|
||||
#define MULDIV255(a, b, tmp) \
|
||||
(tmp = (a) * (b) + 128, ((((tmp) >> 8) + (tmp)) >> 8))
|
||||
|
||||
/* macro for getting a value out of various numpy arrays the 3D arrays have
|
||||
interesting, swizzled coordinates because minecraft (anvil) stores blocks
|
||||
in y/z/x order for 3D, z/x order for 2D */
|
||||
|
||||
Reference in New Issue
Block a user