diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-19 03:06:12 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-19 03:06:12 +0100 |
commit | dba3aa42580ef3e9cba57df71a231bc00679c551 (patch) | |
tree | 2f2d45468bb5669b4a0e1e95a2369479715e60ac /src/xine-utils | |
parent | 916fbee057ef45a6b7b9dbee93784b16820f6b95 (diff) | |
parent | 75b8595548ee1796fd81e2b5a0a3bc99ee74265d (diff) | |
download | xine-lib-dba3aa42580ef3e9cba57df71a231bc00679c551.tar.gz xine-lib-dba3aa42580ef3e9cba57df71a231bc00679c551.tar.bz2 |
Merge from 1.2 branch.
--HG--
rename : src/xine-utils/xineutils.h => include/xine/xineutils.h
Diffstat (limited to 'src/xine-utils')
-rw-r--r-- | src/xine-utils/utils.c | 13 |
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]). |