include: Note that several rwops functions used to be macros before 2.0.10.

This commit is contained in:
Ryan C. Gordon 2021-11-18 15:30:36 -05:00
parent 319d2b3e05
commit 7f70f6e1e2
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 15 additions and 0 deletions

View File

@ -387,6 +387,8 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
/** /**
* Use this macro to get the size of the data stream in an SDL_RWops. * Use this macro to get the size of the data stream in an SDL_RWops.
* *
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context the SDL_RWops to get the size of the data stream from * \param context the SDL_RWops to get the size of the data stream from
* \returns the size of the data stream in the SDL_RWops on success, -1 if * \returns the size of the data stream in the SDL_RWops on success, -1 if
* unknown or a negative error code on failure; call SDL_GetError() * unknown or a negative error code on failure; call SDL_GetError()
@ -412,6 +414,8 @@ extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
* SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's * SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
* `seek` method appropriately, to simplify application development. * `seek` method appropriately, to simplify application development.
* *
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a pointer to an SDL_RWops structure * \param context a pointer to an SDL_RWops structure
* \param offset an offset in bytes, relative to **whence** location; can be * \param offset an offset in bytes, relative to **whence** location; can be
* negative * negative
@ -439,6 +443,8 @@ extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
* method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify * method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
* application development. * application development.
* *
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a SDL_RWops data stream object from which to get the current * \param context a SDL_RWops data stream object from which to get the current
* offset * offset
* \returns the current offset in the stream, or -1 if the information can not * \returns the current offset in the stream, or -1 if the information can not
@ -468,6 +474,8 @@ extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
* SDL_RWread() is actually a function wrapper that calls the SDL_RWops's * SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
* `read` method appropriately, to simplify application development. * `read` method appropriately, to simplify application development.
* *
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a pointer to an SDL_RWops structure * \param context a pointer to an SDL_RWops structure
* \param ptr a pointer to a buffer to read data into * \param ptr a pointer to a buffer to read data into
* \param size the size of each object to read, in bytes * \param size the size of each object to read, in bytes
@ -500,6 +508,8 @@ extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
* SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's * SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
* `write` method appropriately, to simplify application development. * `write` method appropriately, to simplify application development.
* *
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a pointer to an SDL_RWops structure * \param context a pointer to an SDL_RWops structure
* \param ptr a pointer to a buffer containing data to write * \param ptr a pointer to a buffer containing data to write
* \param size the size of an object to write, in bytes * \param size the size of an object to write, in bytes
@ -535,6 +545,8 @@ extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
* SDL_RWclose() is actually a macro that calls the SDL_RWops's `close` method * SDL_RWclose() is actually a macro that calls the SDL_RWops's `close` method
* appropriately, to simplify application development. * appropriately, to simplify application development.
* *
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context SDL_RWops structure to close * \param context SDL_RWops structure to close
* \returns 0 on success or a negative error code on failure; call * \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information. * SDL_GetError() for more information.
@ -580,6 +592,9 @@ extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
* *
* The data should be freed with SDL_free(). * The data should be freed with SDL_free().
* *
* Prior to SDL 2.0.10, this function was a macro wrapping around
* SDL_LoadFile_RW.
*
* \param file the path to read all available data from * \param file the path to read all available data from
* \param datasize if not NULL, will store the number of bytes read * \param datasize if not NULL, will store the number of bytes read
* \returns the data, or NULL if there was an error. * \returns the data, or NULL if there was an error.