0

Fix C extension build warnings the painful way

Some bad distributions (Debian) apparently are not good enough to
have a Pillow version from this decade packaged.

Therefore, we need to do it the painful way of prefixing our
symbols and refactoring everything to use them.

A new header file called "utils.h" has been added for this purpose,
and it is included in "overviewer.h".

The following macros have been prefixed with "OV_":
- MIN
- MAX
- CLAMP
- BLEND
- MULDIV255

Additionally, the C extension version was bumped to 56 because 55
was reverted back to 54.
This commit is contained in:
Nicolas F
2019-02-22 12:53:47 +01:00
parent 53fa463838
commit b70f1a012f
8 changed files with 65 additions and 61 deletions

View File

@@ -68,7 +68,7 @@ static void get_color(void *data, RenderState *state,
*b = minerals[i].b;
tmp = (128 - y_max + y) * 2 - 40;
*a = MIN(MAX(0, tmp), 255);
*a = OV_MIN(OV_MAX(0, tmp), 255);
max_i = i;
break;