From 0c90b9eed9ce554816c9ca55d3aa30d6203d1679 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 4 Sep 2013 15:34:04 -0700 Subject: [PATCH] * alloc.c (make_event_array): First arg is now ptrdiff_t, not int. This fixes a type error on hosts where ptrdiff_t is wider than int. --- src/ChangeLog | 5 +++++ src/alloc.c | 4 ++-- src/lisp.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e64d22b9a6e..d991c2dac72 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-09-04 Paul Eggert + + * alloc.c (make_event_array): First arg is now ptrdiff_t, not int. + This fixes a type error on hosts where ptrdiff_t is wider than int. + 2013-09-04 Stefan Monnier * keyboard.c (read_key_sequence_vs): New function. diff --git a/src/alloc.c b/src/alloc.c index 8417ef4982b..0989e63664f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3527,9 +3527,9 @@ free_marker (Lisp_Object marker) Any number of arguments, even zero arguments, are allowed. */ Lisp_Object -make_event_array (register int nargs, Lisp_Object *args) +make_event_array (ptrdiff_t nargs, Lisp_Object *args) { - int i; + ptrdiff_t i; for (i = 0; i < nargs; i++) /* The things that fit in a string diff --git a/src/lisp.h b/src/lisp.h index b19745baf91..27359ffeb3f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3463,7 +3463,7 @@ build_unibyte_string (const char *str) } extern Lisp_Object make_multibyte_string (const char *, ptrdiff_t, ptrdiff_t); -extern Lisp_Object make_event_array (int, Lisp_Object *); +extern Lisp_Object make_event_array (ptrdiff_t, Lisp_Object *); extern Lisp_Object make_uninit_string (EMACS_INT); extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT); extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); -- 2.11.4.GIT