aboutsummaryrefslogtreecommitdiffstats
path: root/src/character.c
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-05-15 18:11:54 -0700
committerPaul Eggert <[email protected]>2011-05-15 18:11:54 -0700
commitcb93f9bef01e95b17b3d7b8786c103505355d98c (patch)
treeb144c1445fa517c0f076e1fdbbab22ed5bae1c78 /src/character.c
parentd3cdcd1446538e4608b0d2dc31e6c8bd97bd9c5c (diff)
* 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.
Diffstat (limited to 'src/character.c')
-rw-r--r--src/character.c4
1 files changed, 2 insertions, 2 deletions
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);
}