Files
macports-ports/python/py27-matplotlib/files/patch-src_ft2font.cpp.diff
Renee Otten 6df3cf1e93 py27-matplotlib: move to separate port
- add patch to allow building on macOS 15
- remove no longer supported backends
2024-11-02 07:39:55 -04:00

31 lines
1.2 KiB
Diff

Avoids the errors:
:info:build src/ft2font.cpp:207:29: error: assigning to 'char *' from 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not
:info:build 207 | tags = outline.tags + first;
:info:build | ~~~~~~~~~~~~~^~~~~~~
:info:build src/ft2font.cpp:323:29: error: assigning to 'char *' from 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not
:info:build 323 | tags = outline.tags + first;
:info:build | ~~~~~~~~~~~~~^~~~~~~
:info:build 2 errors generated.
--- src/ft2font.cpp.orig 2024-10-28 22:40:16
+++ src/ft2font.cpp 2024-10-28 22:40:28
@@ -204,7 +204,7 @@
v_control = v_start;
point = outline.points + first;
- tags = outline.tags + first;
+ tags = (char*)(outline.tags) + first;
tag = FT_CURVE_TAG(tags[0]);
// A contour cannot start with a cubic control point!
@@ -320,7 +320,7 @@
v_control = v_start;
point = outline.points + first;
- tags = outline.tags + first;
+ tags = (char*)(outline.tags) + first;
tag = FT_CURVE_TAG(tags[0]);
double x, y;