diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-10-09 17:43:04 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-10-09 17:43:04 +0000 |
| commit | 8aba25a477b91bfae213a8247e364bf4e7cddb69 (patch) | |
| tree | 2e61883b4af1360f88b1bb71360e810c1a768e8c /xmalloc.c | |
| parent | changelog: add contributor (diff) | |
xmalloc: add xwcsdup()
Diffstat (limited to 'xmalloc.c')
| -rw-r--r-- | xmalloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <wchar.h> #include <syslog.h> #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) { |
