[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/alloc.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/alloc.c |
Date: |
Wed, 19 Mar 2003 07:24:44 -0500 |
Index: emacs/src/alloc.c
diff -c emacs/src/alloc.c:1.293 emacs/src/alloc.c:1.294
*** emacs/src/alloc.c:1.293 Sat Feb 22 17:15:31 2003
--- emacs/src/alloc.c Wed Mar 19 07:24:43 2003
***************
*** 1819,1825 ****
/* Make a string from NCHARS characters occupying NBYTES bytes at
CONTENTS. The argument MULTIBYTE controls whether to label the
! string as multibyte. */
Lisp_Object
make_specified_string (contents, nchars, nbytes, multibyte)
--- 1819,1826 ----
/* Make a string from NCHARS characters occupying NBYTES bytes at
CONTENTS. The argument MULTIBYTE controls whether to label the
! string as multibyte. If NCHARS is negative, it counts the number of
! characters by itself. */
Lisp_Object
make_specified_string (contents, nchars, nbytes, multibyte)
***************
*** 1828,1833 ****
--- 1829,1842 ----
int multibyte;
{
register Lisp_Object val;
+
+ if (nchars < 0)
+ {
+ if (multibyte)
+ nchars = multibyte_chars_in_text (contents, nbytes);
+ else
+ nchars = nbytes;
+ }
val = make_uninit_multibyte_string (nchars, nbytes);
bcopy (contents, SDATA (val), nbytes);
if (!multibyte)
- [Emacs-diffs] Changes to emacs/src/alloc.c,
Kenichi Handa <=