aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/helpers.cpp')
-rw-r--r--Alc/helpers.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index 468df505..89f60380 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -729,6 +729,15 @@ void SetRTPriority(void)
#endif
+char *alstrdup(const char *str)
+{
+ const size_t len{strlen(str)};
+ char *ret{static_cast<char*>(al_calloc(DEF_ALIGN, len+1))};
+ memcpy(ret, str, len);
+ return ret;
+}
+
+
void alstr_clear(al_string *str)
{
if(!alstr_empty(*str))