mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-31 17:07:39 +00:00
Fixed bug 4526 - replace SDL_RW* macros with functions for using in bindings
ace I got this bug in SDL_ttf: https://bugzilla.libsdl.org/show_bug.cgi?id=4524 Sylvain proposed solution: SDL_RWseek(RWops, 0, RW_SEEK_SET); And it works, but i can use it my project, because it written in C# with SDL2-CS wrapper and there not export for macroses: #define SDL_RWsize(ctx) (ctx)->size(ctx) #define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) #define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR) #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) #define SDL_RWclose(ctx) (ctx)->close(ctx) Therefore, I suggest replacing this macros with functions so that they can be exported and used in bindings
This commit is contained in:
parent
2b6473dc05
commit
316ff3847b
4 changed files with 106 additions and 13 deletions
|
@ -717,3 +717,10 @@
|
|||
#define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_REAL
|
||||
#define SDL_SIMDAlloc SDL_SIMDAlloc_REAL
|
||||
#define SDL_SIMDFree SDL_SIMDFree_REAL
|
||||
#define SDL_RWsize SDL_RWsize_REAL
|
||||
#define SDL_RWseek SDL_RWseek_REAL
|
||||
#define SDL_RWtell SDL_RWtell_REAL
|
||||
#define SDL_RWread SDL_RWread_REAL
|
||||
#define SDL_RWwrite SDL_RWwrite_REAL
|
||||
#define SDL_RWclose SDL_RWclose_REAL
|
||||
#define SDL_LoadFile SDL_LoadFile_REAL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue