summaryrefslogtreecommitdiff
path: root/src/xine-utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-utils')
-rw-r--r--src/xine-utils/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index 5aff537b4..63d7d343b 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -286,6 +286,19 @@ void *xine_xmalloc_aligned(size_t alignment, size_t size, void **base) {
return ptr;
}
+void *xine_memdup (const void *src, size_t length)
+{
+ void *dst = malloc (length);
+ return xine_fast_memcpy (dst, src, length);
+}
+
+void *xine_memdup0 (const void *src, size_t length)
+{
+ char *dst = xine_xmalloc (length + 1);
+ dst[length] = 0;
+ return xine_fast_memcpy (dst, src, length);
+}
+
#ifdef WIN32
/*
* Parse command line with Windows XP syntax and copy the command (argv[0]).