]> git.eshelyaron.com Git - emacs.git/commit
Introduce a helper macro to convert a Lisp integer to a C integer.
authorPhilipp Stephani <phst@google.com>
Mon, 22 Apr 2019 15:29:06 +0000 (17:29 +0200)
committerPhilipp Stephani <phst@google.com>
Mon, 22 Apr 2019 15:36:52 +0000 (17:36 +0200)
commit4e2ea400cbd78fa791fb897938a6dcb099401a25
treebf386a4685abccf8ffc6ad6cf907e18671f0f405
parent3b4e312cfe1e0b185fea58bc35fa951a8389c144
Introduce a helper macro to convert a Lisp integer to a C integer.

This is similar to CONS_TO_INTEGER.  The inverse (INT_TO_INTEGER)
already exists.

* src/lisp.h (INTEGER_TO_INT): New macro.
(ranged_integer_to_int, ranged_integer_to_uint): New
functions.

* src/json.c (lisp_to_json): Use helper macro.
src/json.c
src/lisp.h