Mercurial > emacs
changeset 56615:c0f488e9cb26
(make_temp_name): Handle multibyte prefixes.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 07 Aug 2004 20:57:19 +0000 |
parents | 9a3481cbb263 |
children | 76bd0e931318 |
files | src/ChangeLog src/fileio.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Aug 07 16:47:41 2004 +0000 +++ b/src/ChangeLog Sat Aug 07 20:57:19 2004 +0000 @@ -1,3 +1,7 @@ +2004-08-07 Stefan Monnier <monnier@iro.umontreal.ca> + + * fileio.c (make_temp_name): Handle multibyte prefixes. + 2004-08-06 Luc Teirlinck <teirllm@auburn.edu> * keyboard.c (syms_of_keyboard) <overriding-terminal-local-map>:
--- a/src/fileio.c Sat Aug 07 16:47:41 2004 +0000 +++ b/src/fileio.c Sat Aug 07 20:57:19 2004 +0000 @@ -886,7 +886,7 @@ int base64_p; { Lisp_Object val; - int len; + int len, clen; int pid; unsigned char *p, *data; char pidbuf[20]; @@ -921,8 +921,10 @@ #endif } - len = SCHARS (prefix); - val = make_uninit_string (len + 3 + pidlen); + len = SBYTES (prefix); clen = SCHARS (prefix); + val = make_uninit_multibyte_string (clen + 3 + pidlen, len + 3 + pidlen); + if (!STRING_MULTIBYTE (prefix)) + STRING_SET_UNIBYTE (val); data = SDATA (val); bcopy(SDATA (prefix), data, len); p = data + len;