testsymbols: Use the existing symbol list in SDL_dynapi_procs.h

This commit is contained in:
Ryan C. Gordon
2025-10-13 10:02:35 -04:00
parent 195c518d78
commit 72a3e4084a
3 changed files with 5 additions and 1285 deletions

View File

@@ -28,7 +28,7 @@
Also, this file gets included multiple times, don't add #pragma once, etc.
*/
// direct jump magic can use these, the rest needs special code.
/* direct jump magic can use these, the rest needs special code. */
#ifndef SDL_DYNAPI_PROC_NO_VARARGS
SDL_DYNAPI_PROC(size_t,SDL_IOprintf,(SDL_IOStream *a, SDL_PRINTF_FORMAT_STRING const char *b, ...),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_Log,(SDL_PRINTF_FORMAT_STRING const char *a, ...),(a),)
@@ -47,7 +47,7 @@ SDL_DYNAPI_PROC(int,SDL_sscanf,(const char *a, SDL_SCANF_FORMAT_STRING const cha
SDL_DYNAPI_PROC(int,SDL_swprintf,(SDL_OUT_Z_CAP(b) wchar_t *a, size_t b, SDL_PRINTF_FORMAT_STRING const wchar_t *c, ...),(a,b,c),return)
#endif
// New API symbols are added at the end
/* New API symbols are added at the end */
SDL_DYNAPI_PROC(SDL_Surface*,SDL_AcquireCameraFrame,(SDL_Camera *a, Uint64 *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_GPUCommandBuffer*,SDL_AcquireGPUCommandBuffer,(SDL_GPUDevice *a),(a),return)
SDL_DYNAPI_PROC(bool,SDL_AcquireGPUSwapchainTexture,(SDL_GPUCommandBuffer *a, SDL_Window *b, SDL_GPUTexture **c, Uint32 *d, Uint32 *e),(a,b,c,d,e),return)

View File

@@ -45,7 +45,6 @@ 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_SYM = SDL_ROOT / "src/dynapi/SDL_dynapi.sym"
TESTSYMBOLS = SDL_ROOT / "test/testsymbols.c"
RE_EXTERN_C = re.compile(r'.*extern[ "]*C[ "].*')
RE_COMMENT_REMOVE_CONTENT = re.compile(r'\/\*.*\*/')
@@ -512,20 +511,6 @@ def add_dyn_api(proc: SdlProcedure) -> None:
for line in new_input:
f.write(line)
# File: test/testsymbols.c
#
# Add before "extra symbols go here" line
with TESTSYMBOLS.open() as f:
new_input = []
for line in f:
if "extra symbols go here" in line:
new_input.append(f" SDL_SYMBOL_ITEM({proc.name}),\n")
new_input.append(line)
with TESTSYMBOLS.open("w", newline="") as f:
for line in new_input:
f.write(line)
def main():
parser = argparse.ArgumentParser()

File diff suppressed because it is too large Load Diff