Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
This is consistent with the naming for the functions that affect other data types Fixes https://github.com/libsdl-org/SDL/issues/10241
This commit is contained in:
@@ -343,14 +343,14 @@ static int iostrm_testDynamicMem(void *arg)
|
||||
testGenericIOStreamValidations(rw, SDL_TRUE);
|
||||
|
||||
/* Get the dynamic memory and verify it */
|
||||
mem = (char *)SDL_GetProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL);
|
||||
SDLTest_AssertPass("Call to SDL_GetProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL) succeeded");
|
||||
mem = (char *)SDL_GetPointerProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL);
|
||||
SDLTest_AssertPass("Call to SDL_GetPointerProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL) succeeded");
|
||||
SDLTest_AssertCheck(mem != NULL, "Verify memory value is not NULL");
|
||||
mem[SDL_GetIOSize(rw)] = '\0';
|
||||
SDLTest_AssertCheck(SDL_strcmp(mem, IOStreamHelloWorldTestString) == 0, "Verify memory value is correct");
|
||||
|
||||
/* Take the memory and free it ourselves */
|
||||
SDL_SetProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL);
|
||||
SDL_SetPointerProperty(props, SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER, NULL);
|
||||
SDL_free(mem);
|
||||
|
||||
/* Close */
|
||||
|
||||
Reference in New Issue
Block a user