diff options
author | Miles Bader <miles@gnu.org> | 2007-06-11 01:00:07 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-06-11 01:00:07 +0000 |
commit | 67f3ad67ee317226cb5d1bb139de0cfd883fdc5e (patch) | |
tree | 58a0e1bea7a1d8728fd32e6127a44434e7eac006 /src/alloc.c | |
parent | d17cf4eb2024cf54e4a216312184665094ee3df4 (diff) | |
parent | 2d715b39ea1c89066f469405d065dd1a6631d28e (diff) | |
download | emacs-67f3ad67ee317226cb5d1bb139de0cfd883fdc5e.tar.gz emacs-67f3ad67ee317226cb5d1bb139de0cfd883fdc5e.tar.bz2 emacs-67f3ad67ee317226cb5d1bb139de0cfd883fdc5e.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--multi-tty--0--patch-21
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 574196059f8..cc6d1d55870 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1759,6 +1759,8 @@ init_strings () string_blocks = NULL; n_string_blocks = 0; string_free_list = NULL; + empty_unibyte_string = make_pure_string ("", 0, 0, 0); + empty_multibyte_string = make_pure_string ("", 0, 0, 1); } @@ -2482,6 +2484,9 @@ make_uninit_string (length) int length; { Lisp_Object val; + + if (!length) + return empty_unibyte_string; val = make_uninit_multibyte_string (length, length); STRING_SET_UNIBYTE (val); return val; @@ -2500,6 +2505,8 @@ make_uninit_multibyte_string (nchars, nbytes) if (nchars < 0) abort (); + if (!nbytes) + return empty_multibyte_string; s = allocate_string (); allocate_string_data (s, nchars, nbytes); |