diff options
| author | Kenichi Handa | 2000-11-20 01:06:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-11-20 01:06:33 +0000 |
| commit | 495a6df36d7e6f8fa29084076e738ca3f2a07985 (patch) | |
| tree | dff8b8257bb977b280028ff4c9ea93340bcc7613 /src | |
| parent | 030de92f84ce02cb24cbca4d07ee471a095c493c (diff) | |
| download | emacs-495a6df36d7e6f8fa29084076e738ca3f2a07985.tar.gz emacs-495a6df36d7e6f8fa29084076e738ca3f2a07985.zip | |
(make_string): Fix previous change. Be sure to make
unibyte string correctly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/alloc.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a88fc35df91..855b89bbb1b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-11-20 Kenichi Handa <handa@etl.go.jp> | ||
| 2 | |||
| 3 | * alloc.c (make_string): Fix previous change. Be sure to make | ||
| 4 | unibyte string correctly. | ||
| 5 | |||
| 1 | 2000-11-19 Gerd Moellmann <gerd@gnu.org> | 6 | 2000-11-19 Gerd Moellmann <gerd@gnu.org> |
| 2 | 7 | ||
| 3 | * window.c (Fwindow_list): Change parameter list to be XEmacs | 8 | * window.c (Fwindow_list): Change parameter list to be XEmacs |
diff --git a/src/alloc.c b/src/alloc.c index 625dc14720f..bf93f6705b4 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1701,12 +1701,12 @@ make_string (contents, nbytes) | |||
| 1701 | int nchars, multibyte_nbytes; | 1701 | int nchars, multibyte_nbytes; |
| 1702 | 1702 | ||
| 1703 | parse_str_as_multibyte (contents, nbytes, &nchars, &multibyte_nbytes); | 1703 | parse_str_as_multibyte (contents, nbytes, &nchars, &multibyte_nbytes); |
| 1704 | val = make_uninit_multibyte_string (nchars, nbytes); | ||
| 1705 | bcopy (contents, XSTRING (val)->data, nbytes); | ||
| 1706 | if (nbytes == nchars || nbytes != multibyte_nbytes) | 1704 | if (nbytes == nchars || nbytes != multibyte_nbytes) |
| 1707 | /* CONTENTS contains no multibyte sequences or contains an invalid | 1705 | /* CONTENTS contains no multibyte sequences or contains an invalid |
| 1708 | multibyte sequence. We must make unibyte string. */ | 1706 | multibyte sequence. We must make unibyte string. */ |
| 1709 | SET_STRING_BYTES (XSTRING (val), -1); | 1707 | val = make_unibyte_string (contents, nbytes); |
| 1708 | else | ||
| 1709 | val = make_multibyte_string (contents, nchars, nbytes); | ||
| 1710 | return val; | 1710 | return val; |
| 1711 | } | 1711 | } |
| 1712 | 1712 | ||