aboutsummaryrefslogtreecommitdiffstats
path: root/src/composite.c
diff options
context:
space:
mode:
authorStefan Monnier2008-09-17 21:25:29 +0000
committerStefan Monnier2008-09-17 21:25:29 +0000
commit46f905e18a25390eda6db7705e2ddcf5e73305d2 (patch)
tree964504a57e1a75f9a8c2c2e55aea449dff8f22bc /src/composite.c
parent051facecbf0ea610a9a1311dc877eac37acdc3fb (diff)
downloademacs-46f905e18a25390eda6db7705e2ddcf5e73305d2.tar.gz
emacs-46f905e18a25390eda6db7705e2ddcf5e73305d2.zip
(Fcomposition_get_gstring): Yet another int/Lisp_Oject mixup (YAILOM).
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/composite.c b/src/composite.c
index 95f700c7116..5773744c083 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1489,6 +1489,7 @@ must be ignore. */)
1489 Lisp_Object font_object, from, to, string; 1489 Lisp_Object font_object, from, to, string;
1490{ 1490{
1491 Lisp_Object gstring, header; 1491 Lisp_Object gstring, header;
1492 EMACS_INT frompos, topos;
1492 1493
1493 if (! NILP (font_object)) 1494 if (! NILP (font_object))
1494 CHECK_FONT_OBJECT (font_object); 1495 CHECK_FONT_OBJECT (font_object);
@@ -1496,8 +1497,13 @@ must be ignore. */)
1496 gstring = gstring_lookup_cache (header); 1497 gstring = gstring_lookup_cache (header);
1497 if (! NILP (gstring)) 1498 if (! NILP (gstring))
1498 return gstring; 1499 return gstring;
1499 if (LGSTRING_GLYPH_LEN (gstring_work) < to - from) 1500
1500 gstring_work = Fmake_vector (make_number (to - from + 2), Qnil); 1501 /* Maybe we should check this at the function's entry. --Stef */
1502 CHECK_NATNUM (from); frompos = XINT (from);
1503 CHECK_NATNUM (to); topos = XINT (to);
1504
1505 if (LGSTRING_GLYPH_LEN (gstring_work) < topos - frompos)
1506 gstring_work = Fmake_vector (make_number (topos - frompos + 2), Qnil);
1501 LGSTRING_SET_HEADER (gstring_work, header); 1507 LGSTRING_SET_HEADER (gstring_work, header);
1502 LGSTRING_SET_ID (gstring_work, Qnil); 1508 LGSTRING_SET_ID (gstring_work, Qnil);
1503 fill_gstring_body (gstring_work); 1509 fill_gstring_body (gstring_work);