From cb93f9bef01e95b17b3d7b8786c103505355d98c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 15 May 2011 18:11:54 -0700 Subject: * alloc.c (string_overflow): New function. (Fmake_string): Use it. This doesn't change behavior, but saves a few bytes and will simplify future changes. * character.c (string_escape_byte8): Likewise. * lisp.h (string_overflow): New decl. --- src/character.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/character.c') diff --git a/src/character.c b/src/character.c index 64ea2625ab..6a8b86d5d8 100644 --- a/src/character.c +++ b/src/character.c @@ -823,7 +823,7 @@ string_escape_byte8 (Lisp_Object string) { if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count || (MOST_POSITIVE_FIXNUM - nbytes) / 2 < byte8_count) - error ("Maximum string size exceeded"); + string_overflow (); /* Convert 2-byte sequence of byte8 chars to 4-byte octal. */ val = make_uninit_multibyte_string (nchars + byte8_count * 3, @@ -832,7 +832,7 @@ string_escape_byte8 (Lisp_Object string) else { if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count) - error ("Maximum string size exceeded"); + string_overflow (); /* Convert 1-byte sequence of byte8 chars to 4-byte octal. */ val = make_uninit_string (nbytes + byte8_count * 3); } -- cgit v1.2.3