• Paul Eggert's avatar
    Improve integer range checking · bec5cfee
    Paul Eggert authored
    * src/bignum.c (check_integer_range, check_uinteger_max)
    (check_int_nonnegative): New functions.
    * src/frame.c (check_frame_pixels): New function.
    (Fset_frame_height, Fset_frame_width, Fset_frame_size): Use it.
    * src/lisp.h (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER):
    Remove these macros.  Unless otherwise specified, all callers
    replaced by calls to check_integer_range, check_uinteger_range,
    check_int_nonnegative.
    * src/frame.c (gui_set_right_divider_width)
    (gui_set_bottom_divider_width):
    * src/nsfns.m (ns_set_internal_border_width):
    * src/xfns.c (x_set_internal_border_width):
    Using check_int_nonnegative means these functions no longer
    incorrectly reject negative bignums; they treat them as 0,
    just like negative fixnums.
    bec5cfee