mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 10:53:27 +08:00
Removed SDL_DECLSPEC_FREE
This commit is contained in:
parent
18fe89e036
commit
b5ad74998b
@ -457,7 +457,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
|
||||
* \sa SDL_OpenAudioDevice
|
||||
* \sa SDL_GetAudioRecordingDevices
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices(int *count);
|
||||
extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices(int *count);
|
||||
|
||||
/**
|
||||
* Get a list of currently-connected audio recording devices.
|
||||
@ -486,7 +486,7 @@ extern SDL_DECLSPEC_FREE SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices
|
||||
* \sa SDL_OpenAudioDevice
|
||||
* \sa SDL_GetAudioPlaybackDevices
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int *count);
|
||||
extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int *count);
|
||||
|
||||
/**
|
||||
* Get the human-readable name of a specific audio device.
|
||||
@ -561,7 +561,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE int * SDLCALL SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int *count);
|
||||
extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int *count);
|
||||
|
||||
/**
|
||||
* Open a specific audio device.
|
||||
@ -1111,7 +1111,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetAudioStreamGain(SDL_AudioStream *stream,
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *stream, int *count);
|
||||
extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *stream, int *count);
|
||||
|
||||
/**
|
||||
* Get the current output channel map of an audio stream.
|
||||
@ -1135,7 +1135,7 @@ extern SDL_DECLSPEC_FREE int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_Aud
|
||||
*
|
||||
* \sa SDL_SetAudioStreamInputChannelMap
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream *stream, int *count);
|
||||
extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream *stream, int *count);
|
||||
|
||||
/**
|
||||
* Set the current input channel map of an audio stream.
|
||||
|
@ -69,8 +69,8 @@
|
||||
#endif
|
||||
|
||||
/* This is used to mark functions that return memory that need to be freed with SDL_free() */
|
||||
#ifndef SDL_DECLSPEC_FREE
|
||||
#define SDL_DECLSPEC_FREE SDL_DECLSPEC
|
||||
#ifndef SDL_DECLSPEC
|
||||
#define SDL_DECLSPEC SDL_DECLSPEC
|
||||
#endif
|
||||
|
||||
/* By default SDL uses the C calling convention */
|
||||
|
@ -178,7 +178,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void);
|
||||
*
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
|
||||
extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
|
||||
|
||||
/**
|
||||
* Get the list of native formats/sizes a camera supports.
|
||||
@ -217,7 +217,7 @@ extern SDL_DECLSPEC_FREE SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
|
||||
* \sa SDL_GetCameras
|
||||
* \sa SDL_OpenCamera
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID devid, int *count);
|
||||
extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID devid, int *count);
|
||||
|
||||
/**
|
||||
* Get the human-readable device name for a camera.
|
||||
|
@ -71,7 +71,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||
* \sa SDL_HasClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetClipboardText(void);
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||
|
||||
/**
|
||||
* Query whether the clipboard exists and contains a non-empty text string.
|
||||
@ -114,7 +114,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetPrimarySelectionText(void);
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
|
||||
|
||||
/**
|
||||
* Query whether the primary selection exists and contains a non-empty text
|
||||
@ -225,7 +225,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_ClearClipboardData(void);
|
||||
* \sa SDL_HasClipboardData
|
||||
* \sa SDL_SetClipboardData
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE void * SDLCALL SDL_GetClipboardData(const char *mime_type, size_t *size);
|
||||
extern SDL_DECLSPEC void * SDLCALL SDL_GetClipboardData(const char *mime_type, size_t *size);
|
||||
|
||||
/**
|
||||
* Query whether there is data in the clipboard for the provided mime type.
|
||||
|
@ -132,7 +132,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void);
|
||||
*
|
||||
* \sa SDL_GetBasePath
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
|
||||
/**
|
||||
* The type of the OS-provided default folder for a specific purpose.
|
||||
@ -375,7 +375,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char ** SDLCALL SDL_GlobDirectory(const char *path, const char *pattern, SDL_GlobFlags flags, int *count);
|
||||
extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const char *pattern, SDL_GlobFlags flags, int *count);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
@ -398,7 +398,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_ReloadGamepadMappings(void);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char ** SDLCALL SDL_GetGamepadMappings(int *count);
|
||||
extern SDL_DECLSPEC char ** SDLCALL SDL_GetGamepadMappings(int *count);
|
||||
|
||||
/**
|
||||
* Get the gamepad mapping string for a given GUID.
|
||||
@ -413,7 +413,7 @@ extern SDL_DECLSPEC_FREE char ** SDLCALL SDL_GetGamepadMappings(int *count);
|
||||
* \sa SDL_GetJoystickGUIDForID
|
||||
* \sa SDL_GetJoystickGUID
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID guid);
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID guid);
|
||||
|
||||
/**
|
||||
* Get the current mapping of a gamepad.
|
||||
@ -432,7 +432,7 @@ extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID gu
|
||||
* \sa SDL_GetGamepadMappingForGUID
|
||||
* \sa SDL_SetGamepadMapping
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad);
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad);
|
||||
|
||||
/**
|
||||
* Set the current mapping of a joystick or gamepad.
|
||||
@ -477,7 +477,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasGamepad(void);
|
||||
* \sa SDL_HasGamepad
|
||||
* \sa SDL_OpenGamepad
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_JoystickID * SDLCALL SDL_GetGamepads(int *count);
|
||||
extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetGamepads(int *count);
|
||||
|
||||
/**
|
||||
* Check if the given joystick is supported by the gamepad interface.
|
||||
@ -653,7 +653,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_Joys
|
||||
* \sa SDL_GetGamepads
|
||||
* \sa SDL_GetGamepadMapping
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);
|
||||
|
||||
/**
|
||||
* Open a gamepad for use.
|
||||
@ -1007,7 +1007,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GamepadEventsEnabled(void);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_GamepadBinding ** SDLCALL SDL_GetGamepadBindings(SDL_Gamepad *gamepad, int *count);
|
||||
extern SDL_DECLSPEC SDL_GamepadBinding ** SDLCALL SDL_GetGamepadBindings(SDL_Gamepad *gamepad, int *count);
|
||||
|
||||
/**
|
||||
* Manually pump gamepad updates if not using the loop.
|
||||
|
@ -942,7 +942,7 @@ typedef Uint32 SDL_HapticID;
|
||||
*
|
||||
* \sa SDL_OpenHaptic
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_HapticID * SDLCALL SDL_GetHaptics(int *count);
|
||||
extern SDL_DECLSPEC SDL_HapticID * SDLCALL SDL_GetHaptics(int *count);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a haptic device.
|
||||
|
@ -212,7 +212,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasJoystick(void);
|
||||
* \sa SDL_HasJoystick
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_JoystickID * SDLCALL SDL_GetJoysticks(int *count);
|
||||
extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetJoysticks(int *count);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
|
@ -84,7 +84,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasKeyboard(void);
|
||||
* \sa SDL_GetKeyboardNameForID
|
||||
* \sa SDL_HasKeyboard
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_KeyboardID * SDLCALL SDL_GetKeyboards(int *count);
|
||||
extern SDL_DECLSPEC SDL_KeyboardID * SDLCALL SDL_GetKeyboards(int *count);
|
||||
|
||||
/**
|
||||
* Get the name of a keyboard.
|
||||
|
@ -98,7 +98,7 @@ typedef struct SDL_Locale
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_Locale ** SDLCALL SDL_GetPreferredLocales(int *count);
|
||||
extern SDL_DECLSPEC SDL_Locale ** SDLCALL SDL_GetPreferredLocales(int *count);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
@ -146,7 +146,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasMouse(void);
|
||||
* \sa SDL_GetMouseNameForID
|
||||
* \sa SDL_HasMouse
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_MouseID * SDLCALL SDL_GetMice(int *count);
|
||||
extern SDL_DECLSPEC SDL_MouseID * SDLCALL SDL_GetMice(int *count);
|
||||
|
||||
/**
|
||||
* Get the name of a mouse.
|
||||
|
@ -527,9 +527,9 @@ extern "C" {
|
||||
#define SDL_stack_free(data) SDL_free(data)
|
||||
#endif
|
||||
|
||||
extern SDL_DECLSPEC_FREE SDL_MALLOC void * SDLCALL SDL_malloc(size_t size);
|
||||
extern SDL_DECLSPEC_FREE SDL_MALLOC SDL_ALLOC_SIZE2(1, 2) void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
||||
extern SDL_DECLSPEC_FREE SDL_ALLOC_SIZE(2) void * SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern SDL_DECLSPEC SDL_MALLOC void * SDLCALL SDL_malloc(size_t size);
|
||||
extern SDL_DECLSPEC SDL_MALLOC SDL_ALLOC_SIZE2(1, 2) void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
||||
extern SDL_DECLSPEC SDL_ALLOC_SIZE(2) void * SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_free(void *mem);
|
||||
|
||||
typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
|
||||
|
@ -419,7 +419,7 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *sto
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE char ** SDLCALL SDL_GlobStorageDirectory(SDL_Storage *storage, const char *path, const char *pattern, SDL_GlobFlags flags, int *count);
|
||||
extern SDL_DECLSPEC char ** SDLCALL SDL_GlobStorageDirectory(SDL_Storage *storage, const char *path, const char *pattern, SDL_GlobFlags flags, int *count);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
@ -91,7 +91,7 @@ typedef struct SDL_Finger
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_TouchID * SDLCALL SDL_GetTouchDevices(int *count);
|
||||
extern SDL_DECLSPEC SDL_TouchID * SDLCALL SDL_GetTouchDevices(int *count);
|
||||
|
||||
/**
|
||||
* Get the touch device name as reported from the driver.
|
||||
@ -127,7 +127,7 @@ extern SDL_DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_Touch
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_Finger ** SDLCALL SDL_GetTouchFingers(SDL_TouchID touchID, int *count);
|
||||
extern SDL_DECLSPEC SDL_Finger ** SDLCALL SDL_GetTouchFingers(SDL_TouchID touchID, int *count);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
@ -395,7 +395,7 @@ extern SDL_DECLSPEC SDL_SystemTheme SDLCALL SDL_GetSystemTheme(void);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_DisplayID * SDLCALL SDL_GetDisplays(int *count);
|
||||
extern SDL_DECLSPEC SDL_DisplayID * SDLCALL SDL_GetDisplays(int *count);
|
||||
|
||||
/**
|
||||
* Return the primary display.
|
||||
@ -560,7 +560,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetDisplayContentScale(SDL_DisplayID displ
|
||||
*
|
||||
* \sa SDL_GetDisplays
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int *count);
|
||||
extern SDL_DECLSPEC SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int *count);
|
||||
|
||||
/**
|
||||
* Get the closest match to the requested display mode.
|
||||
@ -770,7 +770,7 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetWindowFullscreenMode(
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size);
|
||||
extern SDL_DECLSPEC void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size);
|
||||
|
||||
/**
|
||||
* Get the pixel format associated with the window.
|
||||
@ -796,7 +796,7 @@ extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetWindowPixelFormat(SDL_Window
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC_FREE SDL_Window ** SDLCALL SDL_GetWindows(int *count);
|
||||
extern SDL_DECLSPEC SDL_Window ** SDLCALL SDL_GetWindows(int *count);
|
||||
|
||||
/**
|
||||
* Create a window with the specified dimensions and flags.
|
||||
|
@ -196,7 +196,6 @@ def main():
|
||||
#
|
||||
func_ret = func_ret.replace('extern', ' ')
|
||||
func_ret = func_ret.replace('SDLCALL', ' ')
|
||||
func_ret = func_ret.replace('SDL_DECLSPEC_FREE', ' ')
|
||||
func_ret = func_ret.replace('SDL_DECLSPEC', ' ')
|
||||
# Remove trailing spaces in front of '*'
|
||||
tmp = ""
|
||||
|
Loading…
Reference in New Issue
Block a user