aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-01 22:29:51 +0000
committerRichard M. Stallman1995-07-01 22:29:51 +0000
commit60573a904900a07b417eadbb61383568dc4354c2 (patch)
tree69a25f1525cbff628c360424bb91567480c44cdb /src/xfaces.c
parent643f822f0a6663d5fda3a37f3a41d4841159b53e (diff)
downloademacs-60573a904900a07b417eadbb61383568dc4354c2.tar.gz
emacs-60573a904900a07b417eadbb61383568dc4354c2.zip
(compute_char_face): Use Fsafe_length.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index efacf370c27..8872b724810 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -895,10 +895,13 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr, limit, mouse)
895 if (CONSP (prop)) 895 if (CONSP (prop))
896 { 896 {
897 /* We have a list of faces, merge them in reverse order */ 897 /* We have a list of faces, merge them in reverse order */
898 Lisp_Object length = Flength (prop); 898 Lisp_Object length;
899 int len = XINT (length); 899 int len;
900 Lisp_Object *faces; 900 Lisp_Object *faces;
901 901
902 length = Fsafe_length (prop);
903 len = XFASTINT (length);
904
902 /* Put them into an array */ 905 /* Put them into an array */
903 faces = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); 906 faces = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
904 for (j = 0; j < len; j++) 907 for (j = 0; j < len; j++)
@@ -932,10 +935,12 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr, limit, mouse)
932 if (CONSP (prop)) 935 if (CONSP (prop))
933 { 936 {
934 /* We have a list of faces, merge them in reverse order */ 937 /* We have a list of faces, merge them in reverse order */
935 Lisp_Object length = Flength (prop); 938 Lisp_Object length;
936 int len = XINT (length); 939 int len;
937 Lisp_Object *faces; 940 Lisp_Object *faces;
938 int i; 941
942 length = Fsafe_length (prop);
943 len = XFASTINT (length);
939 944
940 /* Put them into an array */ 945 /* Put them into an array */
941 faces = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); 946 faces = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));