summaryrefslogtreecommitdiff
path: root/src/editfns.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-21 14:32:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-21 14:32:10 -0700
commitb081724f64cbb2bf1f12efdb4d446c1de9bf3c0c (patch)
tree00f145722fcbfb737a464ee83fbae70be8d6a4b4 /src/editfns.c
parent3de73e5ee550ff9715e3c6034b2575a4386cf331 (diff)
Use ptrdiff_t, not int, for overlay counts.
* buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT): * editfns.c (overlays_around, get_pos_property): * textprop.c (get_char_property_and_overlay): * xdisp.c (next_overlay_change, note_mouse_highlight): * xfaces.c (face_at_buffer_position): * buffer.c (overlays_at, sort_overlays, Foverlays_at) (Fnext_overlay_change, Fprevious_overlay_change): Use ptrdiff_t, not int, for sizes. (overlays_at): Check for size-calculation overflow.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index f0f8c9eb63..c0c0e53026 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -331,13 +331,13 @@ If you set the marker not to point anywhere, the buffer will have no mark. */)
Return the number found, and store them in a vector in VEC
of length LEN. */
-static int
-overlays_around (EMACS_INT pos, Lisp_Object *vec, int len)
+static ptrdiff_t
+overlays_around (EMACS_INT pos, Lisp_Object *vec, ptrdiff_t len)
{
Lisp_Object overlay, start, end;
struct Lisp_Overlay *tail;
EMACS_INT startpos, endpos;
- int idx = 0;
+ ptrdiff_t idx = 0;
for (tail = current_buffer->overlays_before; tail; tail = tail->next)
{
@@ -405,7 +405,7 @@ get_pos_property (Lisp_Object position, register Lisp_Object prop, Lisp_Object o
else
{
EMACS_INT posn = XINT (position);
- int noverlays;
+ ptrdiff_t noverlays;
Lisp_Object *overlay_vec, tem;
struct buffer *obuf = current_buffer;