comparison src/lisp.h @ 4134:ac5a714be3a2

[xemacs-hg @ 2007-08-21 20:32:33 by aidan] Don't use args to XINT_OR_CHAR where multiple evaluation is possible; revise X_I_O_C to not multiply evaluate.
author aidan
date Tue, 21 Aug 2007 20:32:37 +0000
parents 5333f383efbd
children d9eb5ea14f65
comparison
equal deleted inserted replaced
4133:5b55fa103aa1 4134:ac5a714be3a2
2888 return CHARP (obj) ? XCHAR (obj) : XINT (obj); 2888 return CHARP (obj) ? XCHAR (obj) : XINT (obj);
2889 } 2889 }
2890 2890
2891 #else /* no error checking */ 2891 #else /* no error checking */
2892 2892
2893 #define XCHAR_OR_INT(obj) (CHARP (obj) ? XCHAR (obj) : XINT (obj)) 2893 /* obj is multiply eval'ed and not an lvalue; use an inline function instead
2894 of a macro. */
2895 DECLARE_INLINE_HEADER (
2896 EMACS_INT
2897 XCHAR_OR_INT (Lisp_Object obj)
2898 )
2899 {
2900 return CHARP (obj) ? XCHAR (obj) : XINT (obj);
2901 }
2894 2902
2895 #endif /* no error checking */ 2903 #endif /* no error checking */
2896 2904
2897 /* True of X is an integer whose value is the valid integral equivalent of a 2905 /* True of X is an integer whose value is the valid integral equivalent of a
2898 character. */ 2906 character. */