From c8c9b51761fdd1041efc05123bbe5129d9f7b6e0 Mon Sep 17 00:00:00 2001 From: SDL Wiki Bot Date: Mon, 29 Apr 2024 20:53:12 +0000 Subject: [PATCH] Sync SDL3 header -> wiki --- SDL3/README/migration.md | 3 +++ SDL3/SDL_arraysize.md | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/SDL3/README/migration.md b/SDL3/README/migration.md index 7d45e93e7..f85db015d 100644 --- a/SDL3/README/migration.md +++ b/SDL3/README/migration.md @@ -1425,6 +1425,9 @@ SDL3 attempts to apply consistency to case-insensitive string functions. In SDL2 Please note that the case-folding technique used by SDL3 will not produce correct results for the "Turkish 'I'"; this one letter is a surprisingly hard problem in the Unicode world, and since these functions do not specify the human language in use, we have chosen to ignore this problem. +The following macros have been removed: +* SDL_TABLESIZE() - use SDL_arraysize() instead + The following functions have been renamed: * SDL_strtokr() => SDL_strtok_r() diff --git a/SDL3/SDL_arraysize.md b/SDL3/SDL_arraysize.md index f1980a2a6..0dbe0e859 100644 --- a/SDL3/SDL_arraysize.md +++ b/SDL3/SDL_arraysize.md @@ -10,9 +10,14 @@ Defined in [](https://github.com/libsdl-org/SDL/blob/main/inc ## Syntax ```c -#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) +#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) ``` +## Remarks + +NOTE: This macro double-evaluates the argument, so you should never have +side effects in the parameter. + ## Version This macro is available since SDL 3.0.0.