1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

thirdparty: make fontstash and sokol C-libraries work with Boehm-GC (#9506)

This commit is contained in:
Uwe Krüger
2021-03-29 11:27:34 +02:00
committed by GitHub
parent 89082de5d1
commit c1d4074bc4
4 changed files with 44 additions and 25 deletions

View File

@@ -2,6 +2,11 @@ module fontstash
#flag -I @VROOT/thirdparty/fontstash
#define FONTSTASH_IMPLEMENTATION
$if gcboehm ? {
#define FONTSTASH_MALLOC GC_MALLOC
#define FONTSTASH_REALLOC GC_REALLOC
#define FONTSTASH_FREE GC_FREE
}
#include "fontstash.h"
#flag -I /usr/local/Cellar/freetype/2.10.2/include/freetype2
//#flag -lfreetype

View File

@@ -33,6 +33,14 @@ pub const (
#flag freebsd -DSOKOL_NO_ENTRY
#flag solaris -DSOKOL_NO_ENTRY
// TODO end
$if gcboehm ? {
#define SOKOL_MALLOC GC_MALLOC
#define SOKOL_CALLOC(n,m) GC_MALLOC((n)*(m))
#define SOKOL_REALLOC GC_REALLOC
#define SOKOL_FREE GC_FREE
}
#include "sokol_v.h"
#include "sokol_app.h"
#define SOKOL_IMPL