Fix bug 4746 - introduce SDL_zeroa macro.

This commit is contained in:
Ozkan Sezer 2019-07-31 01:22:02 +03:00
parent ac4cb57923
commit ab8f831379
5 changed files with 9 additions and 8 deletions

View file

@ -415,6 +415,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c,
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)