Mercurial > hg > xemacs-beta
comparison src/lisp-disunion.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children | 11054d720c21 |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
68 XCHARVAL The value bits of a Lisp_Object storing a Emchar | 68 XCHARVAL The value bits of a Lisp_Object storing a Emchar |
69 XREALINT The value bits of a Lisp_Object storing an integer, signed | 69 XREALINT The value bits of a Lisp_Object storing an integer, signed |
70 XUINT The value bits of a Lisp_Object storing an integer, unsigned | 70 XUINT The value bits of a Lisp_Object storing an integer, unsigned |
71 INTP Non-zero if this Lisp_Object an integer? | 71 INTP Non-zero if this Lisp_Object an integer? |
72 Qzero Lisp Integer 0 | 72 Qzero Lisp Integer 0 |
73 EQ Non-zero if two Lisp_Objects are identical */ | 73 EQ Non-zero if two Lisp_Objects are identical |
74 | 74 GC_EQ Version of EQ used during garbage collection */ |
75 | 75 |
76 typedef EMACS_INT Lisp_Object; | 76 typedef EMACS_INT Lisp_Object; |
77 | 77 |
78 #define Lisp_Type_Int_Bit (Lisp_Type_Int_Even & Lisp_Type_Int_Odd) | 78 #define Lisp_Type_Int_Bit (Lisp_Type_Int_Even & Lisp_Type_Int_Odd) |
79 #define make_obj(vartype, x) ((Lisp_Object) (x)) | 79 #define make_obj(vartype, x) ((Lisp_Object) (x)) |
81 #define make_char(x) ((Lisp_Object) (((x) << GCBITS) | Lisp_Type_Char)) | 81 #define make_char(x) ((Lisp_Object) (((x) << GCBITS) | Lisp_Type_Char)) |
82 #define VALMASK (((1UL << VALBITS) - 1UL) << GCTYPEBITS) | 82 #define VALMASK (((1UL << VALBITS) - 1UL) << GCTYPEBITS) |
83 #define XTYPE(x) ((enum Lisp_Type) (((EMACS_UINT)(x)) & ~VALMASK)) | 83 #define XTYPE(x) ((enum Lisp_Type) (((EMACS_UINT)(x)) & ~VALMASK)) |
84 #define XPNTRVAL(x) (x) /* This depends on Lisp_Type_Record == 0 */ | 84 #define XPNTRVAL(x) (x) /* This depends on Lisp_Type_Record == 0 */ |
85 #define XCHARVAL(x) ((x) >> GCBITS) | 85 #define XCHARVAL(x) ((x) >> GCBITS) |
86 #define GC_EQ(x,y) EQ (x,y) | |
86 #define XREALINT(x) ((x) >> INT_GCBITS) | 87 #define XREALINT(x) ((x) >> INT_GCBITS) |
87 #define XUINT(x) ((EMACS_UINT)(x) >> INT_GCBITS) | 88 #define XUINT(x) ((EMACS_UINT)(x) >> INT_GCBITS) |
88 #define INTP(x) ((EMACS_UINT)(x) & Lisp_Type_Int_Bit) | 89 #define INTP(x) ((EMACS_UINT)(x) & Lisp_Type_Int_Bit) |
89 #define INT_PLUS(x,y) ((x)+(y)-Lisp_Type_Int_Bit) | |
90 #define INT_MINUS(x,y) ((x)-(y)+Lisp_Type_Int_Bit) | |
91 #define INT_PLUS1(x) INT_PLUS (x, make_int (1)) | |
92 #define INT_MINUS1(x) INT_MINUS (x, make_int (1)) | |
93 | 90 |
94 #define Qzero make_int (0) | 91 #define Qzero make_int (0) |
95 #define Qnull_pointer ((Lisp_Object) 0) | 92 #define Qnull_pointer ((Lisp_Object) 0) |
93 #define XGCTYPE(x) XTYPE(x) | |
96 #define EQ(x,y) ((x) == (y)) | 94 #define EQ(x,y) ((x) == (y)) |
97 #define XSETINT(var, value) ((void) ((var) = make_int (value))) | 95 #define XSETINT(var, value) ((void) ((var) = make_int (value))) |
98 #define XSETCHAR(var, value) ((void) ((var) = make_char (value))) | 96 #define XSETCHAR(var, value) ((void) ((var) = make_char (value))) |
99 #define XSETOBJ(var, vartype, value) ((void) ((var) = make_obj (vartype, value))) | 97 #define XSETOBJ(var, vartype, value) ((void) ((var) = make_obj (vartype, value))) |
100 | 98 |
101 /* Convert between a (void *) and a Lisp_Object, as when the | 99 /* Convert between a (void *) and a Lisp_Object, as when the |
102 Lisp_Object is passed to a toolkit callback function */ | 100 Lisp_Object is passed to a toolkit callback function */ |
103 #define VOID_TO_LISP(larg,varg) ((void) ((larg) = ((Lisp_Object) (varg)))) | 101 #define VOID_TO_LISP(larg,varg) ((void) ((larg) = ((Lisp_Object) (varg)))) |
104 #define CVOID_TO_LISP VOID_TO_LISP | 102 #define CVOID_TO_LISP VOID_TO_LISP |
105 #define LISP_TO_VOID(larg) ((void *) (larg)) | 103 #define LISP_TO_VOID(larg) ((void *) (larg)) |
106 #define LISP_TO_CVOID(varg) ((const void *) (larg)) | 104 #define LISP_TO_CVOID(varg) ((CONST void *) (larg)) |
107 | 105 |
108 /* Convert a Lisp_Object into something that can't be used as an | 106 /* Convert a Lisp_Object into something that can't be used as an |
109 lvalue. Useful for type-checking. */ | 107 lvalue. Useful for type-checking. */ |
110 #define NON_LVALUE(larg) ((larg) + 0) | 108 #define NON_LVALUE(larg) ((larg) + 0) |