Use size_t for the size of memory RWops
parent
80e1c75e1c
commit
32d529bf70
|
@ -108,6 +108,7 @@ typedef struct SDL_RWops
|
|||
{
|
||||
void *asset;
|
||||
} androidio;
|
||||
|
||||
#elif defined(__WIN32__) || defined(__GDK__)
|
||||
struct
|
||||
{
|
||||
|
@ -134,6 +135,7 @@ typedef struct SDL_RWops
|
|||
Uint8 *here;
|
||||
Uint8 *stop;
|
||||
} mem;
|
||||
|
||||
struct
|
||||
{
|
||||
void *data1;
|
||||
|
@ -244,7 +246,7 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
|
|||
* \sa SDL_RWtell
|
||||
* \sa SDL_RWwrite
|
||||
*/
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, size_t size);
|
||||
|
||||
/**
|
||||
* Use this function to prepare a read-only memory buffer for use with RWops.
|
||||
|
@ -278,7 +280,7 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
|
|||
* \sa SDL_RWtell
|
||||
*/
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
|
||||
int size);
|
||||
size_t size);
|
||||
|
||||
/* @} *//* RWFrom functions */
|
||||
|
||||
|
|
|
@ -607,9 +607,9 @@ SDL_DYNAPI_PROC(int,SDL_QueryTexture,(SDL_Texture *a, Uint32 *b, int *c, int *d,
|
|||
SDL_DYNAPI_PROC(int,SDL_QueueAudio,(SDL_AudioDeviceID a, const void *b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Quit,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_QuitSubSystem,(Uint32 a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromConstMem,(const void *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromConstMem,(const void *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFile,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromMem,(void *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromMem,(void *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RWclose,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_RWread,(SDL_RWops *a, void *b, Sint64 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_RWseek,(SDL_RWops *a, Sint64 b, int c),(a,b,c),return)
|
||||
|
|
|
@ -593,7 +593,7 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
|||
return rwops;
|
||||
}
|
||||
|
||||
SDL_RWops *SDL_RWFromMem(void *mem, int size)
|
||||
SDL_RWops *SDL_RWFromMem(void *mem, size_t size)
|
||||
{
|
||||
SDL_RWops *rwops = NULL;
|
||||
if (mem == NULL) {
|
||||
|
@ -620,7 +620,7 @@ SDL_RWops *SDL_RWFromMem(void *mem, int size)
|
|||
return rwops;
|
||||
}
|
||||
|
||||
SDL_RWops *SDL_RWFromConstMem(const void *mem, int size)
|
||||
SDL_RWops *SDL_RWFromConstMem(const void *mem, size_t size)
|
||||
{
|
||||
SDL_RWops *rwops = NULL;
|
||||
if (mem == NULL) {
|
||||
|
|
Loading…
Reference in New Issue