diff options
| author | Miles Bader | 2007-06-11 00:58:11 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-06-11 00:58:11 +0000 |
| commit | fb9a13e3dca1685b81fcf4d345133fb34911594d (patch) | |
| tree | 181797239f450c33ca8fd0d4d18686bbfc68859d /src/alloc.c | |
| parent | 4d3e23e3e8273e820d69e0ecca0f409c4b9a179e (diff) | |
| parent | 2d715b39ea1c89066f469405d065dd1a6631d28e (diff) | |
| download | emacs-fb9a13e3dca1685b81fcf4d345133fb34911594d.tar.gz emacs-fb9a13e3dca1685b81fcf4d345133fb34911594d.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 781-792)
- Update from CVS
- Merge from gnus--rel--5.10
- Merge from emacs--rel--22
* emacs--rel--22 (patch 33-41)
* gnus--rel--5.10 (patch 226-228)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-219
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index 6c757567354..5e9979d1f6e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1756,6 +1756,8 @@ init_strings () | |||
| 1756 | string_blocks = NULL; | 1756 | string_blocks = NULL; |
| 1757 | n_string_blocks = 0; | 1757 | n_string_blocks = 0; |
| 1758 | string_free_list = NULL; | 1758 | string_free_list = NULL; |
| 1759 | empty_unibyte_string = make_pure_string ("", 0, 0, 0); | ||
| 1760 | empty_multibyte_string = make_pure_string ("", 0, 0, 1); | ||
| 1759 | } | 1761 | } |
| 1760 | 1762 | ||
| 1761 | 1763 | ||
| @@ -2479,6 +2481,9 @@ make_uninit_string (length) | |||
| 2479 | int length; | 2481 | int length; |
| 2480 | { | 2482 | { |
| 2481 | Lisp_Object val; | 2483 | Lisp_Object val; |
| 2484 | |||
| 2485 | if (!length) | ||
| 2486 | return empty_unibyte_string; | ||
| 2482 | val = make_uninit_multibyte_string (length, length); | 2487 | val = make_uninit_multibyte_string (length, length); |
| 2483 | STRING_SET_UNIBYTE (val); | 2488 | STRING_SET_UNIBYTE (val); |
| 2484 | return val; | 2489 | return val; |
| @@ -2497,6 +2502,8 @@ make_uninit_multibyte_string (nchars, nbytes) | |||
| 2497 | 2502 | ||
| 2498 | if (nchars < 0) | 2503 | if (nchars < 0) |
| 2499 | abort (); | 2504 | abort (); |
| 2505 | if (!nbytes) | ||
| 2506 | return empty_multibyte_string; | ||
| 2500 | 2507 | ||
| 2501 | s = allocate_string (); | 2508 | s = allocate_string (); |
| 2502 | allocate_string_data (s, nchars, nbytes); | 2509 | allocate_string_data (s, nchars, nbytes); |