aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorJoakim Verona2013-08-14 18:51:46 +0200
committerJoakim Verona2013-08-14 18:51:46 +0200
commit1cd3338c8c8074c0c93c997e4430d441fdec4113 (patch)
treed18dfd08c22a10c375c89f9b66698d10d14cdce6 /src/alloc.c
parentef7cb56e57e53af78783a85df167f943bd5fe039 (diff)
parent5b71542de3ef7f08b7c30e93340502d7cc120910 (diff)
downloademacs-1cd3338c8c8074c0c93c997e4430d441fdec4113.tar.gz
emacs-1cd3338c8c8074c0c93c997e4430d441fdec4113.zip
merge from trunk
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 2c2232601cb..c0d8c32b440 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -802,6 +802,15 @@ xstrdup (const char *s)
802 return memcpy (xmalloc (size), s, size); 802 return memcpy (xmalloc (size), s, size);
803} 803}
804 804
805/* Like above, but duplicates Lisp string to C string. */
806
807char *
808xlispstrdup (Lisp_Object string)
809{
810 ptrdiff_t size = SBYTES (string) + 1;
811 return memcpy (xmalloc (size), SSDATA (string), size);
812}
813
805/* Like putenv, but (1) use the equivalent of xmalloc and (2) the 814/* Like putenv, but (1) use the equivalent of xmalloc and (2) the
806 argument is a const pointer. */ 815 argument is a const pointer. */
807 816