aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alstring.h')
-rw-r--r--Alc/alstring.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/Alc/alstring.h b/Alc/alstring.h
index 5b37a483..d5f64418 100644
--- a/Alc/alstring.h
+++ b/Alc/alstring.h
@@ -7,13 +7,13 @@
typedef char al_string_char_type;
-DECL_VECTOR(al_string_char_type)
+TYPEDEF_VECTOR(al_string_char_type, al_string)
-typedef vector_al_string_char_type al_string;
-typedef const_vector_al_string_char_type const_al_string;
-
-#define AL_STRING_INIT(_x) VECTOR_INIT(_x)
-#define AL_STRING_DEINIT(_x) VECTOR_DEINIT(_x)
+inline void al_string_deinit(al_string *str)
+{ VECTOR_DEINIT(*str); }
+#define AL_STRING_INIT(_x) do { (_x) = (al_string)NULL; } while(0)
+#define AL_STRING_INIT_STATIC() ((al_string)NULL)
+#define AL_STRING_DEINIT(_x) al_string_deinit(&(_x));
inline ALsizei al_string_length(const_al_string str)
{ return VECTOR_SIZE(str); }
@@ -42,7 +42,4 @@ void al_string_append_range(al_string *str, const al_string_char_type *from, con
void al_string_copy_wcstr(al_string *str, const wchar_t *from);
#endif
-
-DECL_VECTOR(al_string)
-
#endif /* ALSTRING_H */