comparison src/lisp-union.h @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents c5d627a313b1
children 74fd4e045ea6
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
87 Lisp_Object; 87 Lisp_Object;
88 88
89 #define XCHARVAL(x) ((x).gu.val) 89 #define XCHARVAL(x) ((x).gu.val)
90 90
91 #ifdef USE_MINIMAL_TAGBITS 91 #ifdef USE_MINIMAL_TAGBITS
92
92 # define XSETINT(var, value) do { \ 93 # define XSETINT(var, value) do { \
93 Lisp_Object *_xzx = &(var); \ 94 EMACS_INT xset_value = (value); \
94 _xzx->s.val = (value); \ 95 Lisp_Object *xset_var = &(var); \
95 _xzx->s.bits = 1; \ 96 xset_var->s.bits = 1; \
97 xset_var->s.val = xset_value; \
96 } while (0) 98 } while (0)
97 # define XSETCHAR(var, value) do { \ 99 # define XSETCHAR(var, value) do { \
98 Lisp_Object *_xzx = &(var); \ 100 Emchar xset_value = (value); \
99 _xzx->gu.val = (EMACS_UINT) (value); \ 101 Lisp_Object *xset_var = &(var); \
100 _xzx->gu.type = Lisp_Type_Char; \ 102 xset_var->gu.type = Lisp_Type_Char; \
103 xset_var->gu.val = xset_value; \
101 } while (0) 104 } while (0)
102 # define XSETOBJ(var, vartype, value) \ 105 # define XSETOBJ(var, vartype, value) do { \
103 ((void) ((var).ui = (EMACS_UINT) (value))) 106 EMACS_UINT xset_value = (EMACS_UINT) (value); \
107 (var).ui = xset_value; \
108 } while (0)
104 # define XPNTRVAL(x) ((x).ui) 109 # define XPNTRVAL(x) ((x).ui)
110
105 #else /* ! USE_MINIMAL_TAGBITS */ 111 #else /* ! USE_MINIMAL_TAGBITS */
112
106 # define XSETOBJ(var, vartype, value) do { \ 113 # define XSETOBJ(var, vartype, value) do { \
107 Lisp_Object *_xzx = &(var); \ 114 EMACS_UINT xset_value = (EMACS_UINT) (value); \
108 _xzx->gu.val = (EMACS_UINT) (value); \ 115 Lisp_Object *xset_var = &(var); \
109 _xzx->gu.type = (vartype); \ 116 xset_var->gu.type = (vartype); \
110 _xzx->gu.markbit = 0; \ 117 xset_var->gu.markbit = 0; \
118 xset_var->gu.val = xset_value; \
111 } while (0) 119 } while (0)
112 # define XSETINT(var, value) XSETOBJ (var, Lisp_Type_Int, value) 120 # define XSETINT(var, value) XSETOBJ (var, Lisp_Type_Int, value)
113 # define XSETCHAR(var, value) XSETOBJ (var, Lisp_Type_Char, value) 121 # define XSETCHAR(var, value) XSETOBJ (var, Lisp_Type_Char, value)
114 # define XPNTRVAL(x) ((x).gu.val) 122 # define XPNTRVAL(x) ((x).gu.val)
123
115 #endif /* ! USE_MINIMAL_TAGBITS */ 124 #endif /* ! USE_MINIMAL_TAGBITS */
116 125
117 INLINE Lisp_Object make_int (EMACS_INT val); 126 INLINE Lisp_Object make_int (EMACS_INT val);
118 INLINE Lisp_Object 127 INLINE Lisp_Object
119 make_int (EMACS_INT val) 128 make_int (EMACS_INT val)