Commit 04d47595 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* fns.c (Fstring_as_unibyte): Use xlispstrdup.

parent a24b9961
2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
* fns.c (Fstring_as_unibyte): Use xlispstrdup.
2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
* print.c (print_object): Print " ..." when truncating bool vectors.
......
......@@ -1009,11 +1009,9 @@ If STRING is multibyte and contains a character of charset
if (STRING_MULTIBYTE (string))
{
ptrdiff_t bytes = SBYTES (string);
unsigned char *str = xmalloc (bytes);
unsigned char *str = xlispstrdup (string);
ptrdiff_t bytes = str_as_unibyte (str, SBYTES (string));
memcpy (str, SDATA (string), bytes);
bytes = str_as_unibyte (str, bytes);
string = make_unibyte_string ((char *) str, bytes);
xfree (str);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment