summaryrefslogtreecommitdiff
path: root/include/al
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-09-14 08:47:05 -0400
committerAndrew Opalach <andrew@akon.city> 2026-09-14 08:47:05 -0400
commit774d6e02030b0b33d4ce0829cf3fbddcd9d0869a (patch)
tree8fdc0b799c2e52b73faf2a580a2c8c3fdd6218a9 /include/al
parent117587f66de7f667daabf90f9f4e8bf2089b9a24 (diff)
downloadlibalabaster-774d6e02030b0b33d4ce0829cf3fbddcd9d0869a.tar.gz
libalabaster-774d6e02030b0b33d4ce0829cf3fbddcd9d0869a.tar.bz2
libalabaster-774d6e02030b0b33d4ce0829cf3fbddcd9d0869a.zip
wstr: al_wstr_null() -> AL_WSTR_EMPTY
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'include/al')
-rw-r--r--include/al/wstr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/al/wstr.h b/include/al/wstr.h
index 964d3d9..70dccff 100644
--- a/include/al/wstr.h
+++ b/include/al/wstr.h
@@ -16,7 +16,7 @@ typedef struct {
#define AL_WSTR_NO_POS ((u32)-1)
-#define al_wstr_null() ((wstr){ 0, 0, NULL })
+#define AL_WSTR_EMPTY ((wstr){ 0, 0, NULL })
#define al_wstr_at(w, index) (w)->data[index]
#define al_wstr_atr(w, index) (w)->data[(w)->length - (index)]
@@ -63,8 +63,8 @@ static inline u32 al_wstr_reserve(wstr *w, u32 size)
static inline void al_wstr_sized(wstr *w, u32 size)
{
- *w = al_wstr_null();
- w->alloc = al_wstr_reserve(w, size * sizeof(wchar_t));
+ *w = AL_WSTR_EMPTY;
+ w->alloc = al_wstr_reserve(w, size);
}
static inline void al_wstr_clone(wstr *dest, wstr *src)