[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: region_limit fix
From: |
Dmitry Antipov |
Subject: |
Re: region_limit fix |
Date: |
Fri, 29 Jun 2012 21:47:00 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 |
On 06/29/2012 08:48 PM, Stefan Monnier wrote:
return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : m);
^^^
mark
Lisp_Object 'm' is compared with ptrdiff_t.
Indeed, thank you for catching and fixing it. I need to change my
config to use the new struct-lisp-type, obviously.
BTW, shouldn't we use clip_to_bounds here? E.g.:
--- src/editfns.c 2012-06-29 02:19:32 +0000
+++ src/editfns.c 2012-06-29 02:42:27 +0000
@@ -284,11 +284,8 @@
if ((PT < XFASTINT (m)) == (beginningp != 0))
return make_number (PT);
- else
- { /* Clip to the current narrowing (bug#11770). */
- ptrdiff_t mark = XFASTINT (m);
- return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : mark);
- }
+ /* Clip to the current narrowing (bug#11770). */
+ return make_number (clip_to_bounds (BEGV, XFASTINT (m), ZV));
}
Dmitry