apple: add exports file

This commit is contained in:
Anonymous Maarten
2026-04-27 00:58:38 +02:00
committed by Anonymous Maarten
parent 364c8037f4
commit 085447a56e
4 changed files with 1303 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -44,6 +44,7 @@ SDL_ROOT = Path(__file__).resolve().parents[2]
SDL_INCLUDE_DIR = SDL_ROOT / "include/SDL3"
SDL_DYNAPI_PROCS_H = SDL_ROOT / "src/dynapi/SDL_dynapi_procs.h"
SDL_DYNAPI_OVERRIDES_H = SDL_ROOT / "src/dynapi/SDL_dynapi_overrides.h"
SDL_DYNAPI_EXPORTS = SDL_ROOT / "src/dynapi/SDL_dynapi.exports"
SDL_DYNAPI_SYM = SDL_ROOT / "src/dynapi/SDL_dynapi.sym"
RE_EXTERN_C = re.compile(r'.*extern[ "]*C[ "].*')
@@ -493,9 +494,15 @@ def add_dyn_api(proc: SdlProcedure) -> None:
#
# Add at last
# "#define SDL_DelayNS SDL_DelayNS_REAL
f = open(SDL_DYNAPI_OVERRIDES_H, "a", newline="")
f.write(f"#define {proc.name} {proc.name}_REAL\n")
f.close()
with open(SDL_DYNAPI_OVERRIDES_H, "a", newline="") as f:
f.write(f"#define {proc.name} {proc.name}_REAL\n")
# File: SDL_dynapi.exports
#
# Append to end
# "_SDL_DelayNS"
with open(SDL_DYNAPI_EXPORTS, "a", newline="") as f:
f.write(f"_{proc.name}\n")
# File: SDL_dynapi.sym
#