"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
- XSETINT (args[argnum], marker_position (args[argnum]));
+ {
+ Bufpos tmp = marker_position (args[argnum]);
+ XSETINT (args[argnum], tmp);
+ }
An even nicer change would be to:
args[argnum] = XINT (marker_position (args[argnum]));
But I don't propose making it because of...
The alternative would be to fix the lisp-union.h versions of XSETINT
and XSETCHAR, but it's not obvious to me how offhand.
The "obvious" way should work. The original is:
# define XSETINT(var, value) do { \
Lisp_Object *xset_var = &(var); \
xset_var->s.bits = 1; \
xset_var->s.val = (value); \
} while (0)
You can change it to:
# define XSETINT(var, value) do { \
Lisp_Object *xset_var = &(var); \
Lisp_Object xset_value = (value); \
xset_var->s.bits = 1; \
xset_var->s.val = xset_value; \
} while (0)
This has the added bonus of evaluating both var and value only once,
and in proper order.
The same change should be done for all XSET* macros.