sdl2-compat: Some things were renamed from Alloc/Free to Create/Destroy.

From b7ca7369ccbc74e3e2812c58ce6d791e55310792 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Fri, 30 Dec 2022 23:21:02 -0500
Subject: [PATCH] Some things were renamed from Alloc/Free to Create/Destroy.

---
 src/sdl2_compat.c | 14 +++++++-------
 src/sdl3_syms.h   |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 931f18e..87d208a 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -1766,7 +1766,7 @@ static Sint64 SDLCALL RWops2to3_write(struct SDL_RWops *rwops3, const void *ptr,
 static int SDLCALL RWops2to3_close(struct SDL_RWops *rwops3)
 {
     const int retval = SDL_RWclose((SDL2_RWops *) rwops3->hidden.unknown.data1);
-    SDL3_FreeRW(rwops3);  /* !!! FIXME: _should_ we free this if SDL_RWclose failed? */
+    SDL3_DestroyRW(rwops3);  /* !!! FIXME: _should_ we free this if SDL_RWclose failed? */
     return retval;
 }
 
@@ -1774,7 +1774,7 @@ static SDL_RWops *RWops2to3(SDL2_RWops *rwops2)
 {
     SDL_RWops *rwops3 = NULL;
     if (rwops2) {
-        rwops3 = SDL3_AllocRW();
+        rwops3 = SDL3_CreateRW();
         if (!rwops3) {
             SDL_RWclose(rwops2);
             return NULL;
@@ -1801,7 +1801,7 @@ SDL_LoadFile_RW(SDL2_RWops *rwops2, size_t *datasize, int freesrc)
     if (rwops3) {
         retval = SDL3_LoadFile_RW(rwops3, datasize, freesrc);
         if (!freesrc) {
-            SDL3_FreeRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
+            SDL3_DestroyRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
         }
     } else {
         if (freesrc) {
@@ -1819,7 +1819,7 @@ SDL_LoadWAV_RW(SDL2_RWops *rwops2, int freesrc, SDL_AudioSpec *spec, Uint8 **aud
     if (rwops3) {
         retval = SDL3_LoadWAV_RW(rwops3, freesrc, spec, audio_buf, audio_len);
         if (!freesrc) {
-            SDL3_FreeRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
+            SDL3_DestroyRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
         }
     } else {
         if (freesrc) {
@@ -1837,7 +1837,7 @@ SDL_LoadBMP_RW(SDL2_RWops *rwops2, int freesrc)
     if (rwops3) {
         retval = SDL3_LoadBMP_RW(rwops3, freesrc);
         if (!freesrc) {
-            SDL3_FreeRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
+            SDL3_DestroyRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
         }
     } else {
         if (freesrc) {
@@ -1855,7 +1855,7 @@ SDL_SaveBMP_RW(SDL_Surface *surface, SDL2_RWops *rwops2, int freedst)
     if (rwops3) {
         retval = SDL3_SaveBMP_RW(surface, rwops3, freedst);
         if (!freedst) {
-            SDL3_FreeRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
+            SDL3_DestroyRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
         }
     } else {
         if (freedst) {
@@ -1873,7 +1873,7 @@ SDL_GameControllerAddMappingsFromRW(SDL2_RWops *rwops2, int freerw)
     if (rwops3) {
         retval = SDL3_AddGamepadMappingsFromRW(rwops3, freerw);
         if (!freerw) {
-            SDL3_FreeRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
+            SDL3_DestroyRW(rwops3);  /* don't close it because that'll close the SDL2_RWops. */
         }
     } else {
         if (freerw) {
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index e256515..a2f2559 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -261,7 +261,7 @@ SDL3_SYM_PASSTHROUGH(SDL_Cursor*,CreateSystemCursor,(SDL_SystemCursor a),(a),ret
 SDL3_SYM_PASSTHROUGH(void,SetCursor,(SDL_Cursor *a),(a),)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,GetCursor,(void),(),return)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,GetDefaultCursor,(void),(),return)
-SDL3_SYM_PASSTHROUGH(void,FreeCursor,(SDL_Cursor *a),(a),)
+SDL3_SYM_RENAMED(void,FreeCursor,DestroyCursor,(SDL_Cursor *a),(a),)
 SDL3_SYM_PASSTHROUGH(SDL_mutex*,CreateMutex,(void),(),return)
 SDL3_SYM_PASSTHROUGH(int,LockMutex,(SDL_mutex *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,TryLockMutex,(SDL_mutex *a),(a),return)
@@ -356,8 +356,8 @@ SDL3_SYM_PASSTHROUGH(int,GL_UnbindTexture,(SDL_Texture *a),(a),return)
 SDL3_SYM(SDL_RWops*,RWFromFile,(const char *a, const char *b),(a,b),return)
 SDL3_SYM(SDL_RWops*,RWFromMem,(void *a, int b),(a,b),return)
 SDL3_SYM(SDL_RWops*,RWFromConstMem,(const void *a, int b),(a,b),return)
-SDL3_SYM(SDL_RWops*,AllocRW,(void),(),return)
-SDL3_SYM(void,FreeRW,(SDL_RWops *a),(a),)
+SDL3_SYM(SDL_RWops*,CreateRW,(void),(),return)
+SDL3_SYM(void,DestroyRW,(SDL_RWops *a),(a),)
 SDL3_SYM(Uint8,ReadU8,(SDL_RWops *a),(a),return)
 SDL3_SYM(Uint16,ReadLE16,(SDL_RWops *a),(a),return)
 SDL3_SYM(Uint16,ReadBE16,(SDL_RWops *a),(a),return)