From 8aba25a477b91bfae213a8247e364bf4e7cddb69 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 9 Oct 2020 19:43:04 +0200 Subject: xmalloc: add xwcsdup() --- xmalloc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xmalloc.c') diff --git a/xmalloc.c b/xmalloc.c index c90b97dc..a9a6685c 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "xmalloc.h" @@ -54,6 +55,12 @@ xstrdup(const char *str) return check_alloc(strdup(str)); } +wchar_t * +xwcsdup(const wchar_t *str) +{ + return check_alloc(wcsdup(str)); +} + char * xstrndup(const char *str, size_t n) { -- cgit v1.3