(make_uninit_string, make_uninit_multibyte_string): Return appropriate
canonical empty string when the requested size is 0.
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);
}
int length;
{
Lisp_Object val;
+
+ if (!length)
+ return empty_unibyte_string;
val = make_uninit_multibyte_string (length, length);
STRING_SET_UNIBYTE (val);
return val;
if (nchars < 0)
abort ();
+ if (!nbytes)
+ return empty_multibyte_string;
s = allocate_string ();
allocate_string_data (s, nchars, nbytes);