comparison src/lisp-disunion.h @ 5027:22179cd0fe15

merge
author Ben Wing <ben@xemacs.org>
date Wed, 10 Feb 2010 07:25:19 -0600
parents ae48681c47fa
children 308d34e9f07d
comparison
equal deleted inserted replaced
5026:46cf825f6158 5027:22179cd0fe15
112 #define Qnull_pointer ((Lisp_Object) 0) 112 #define Qnull_pointer ((Lisp_Object) 0)
113 #define EQ(x,y) ((x) == (y)) 113 #define EQ(x,y) ((x) == (y))
114 114
115 /* WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 115 /* WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
116 116
117 You can only VOID_TO_LISP something that had previously been 117 You can only GET_LISP_FROM_VOID something that had previously been
118 LISP_TO_VOID'd. You cannot go the other way, i.e. create a bogus 118 STORE_LISP_IN_VOID'd. If you want to go the other way, use
119 Lisp_Object. If you want to stuff a void * into a Lisp_Object, use 119 STORE_VOID_IN_LISP and GET_VOID_FROM_LISP, or use make_opaque_ptr(). */
120 make_opaque_ptr(). */
121 120
122 /* Convert between a (void *) and a Lisp_Object, as when the 121 /* Convert a Lisp object to a void * pointer, as when it needs to be passed
123 Lisp_Object is passed to a toolkit callback function */ 122 to a toolkit callback function */
124 #define VOID_TO_LISP(varg) ((Lisp_Object) (varg)) 123 #define STORE_LISP_IN_VOID(larg) ((void *) (larg))
125 #define LISP_TO_VOID(larg) ((void *) (larg)) 124
125 /* Convert a void * pointer back into a Lisp object, assuming that the
126 pointer was generated by STORE_LISP_IN_VOID. */
127 #define GET_LISP_FROM_VOID(varg) ((Lisp_Object) (varg))
126 128
127 /* Convert a Lisp_Object into something that can't be used as an 129 /* Convert a Lisp_Object into something that can't be used as an
128 lvalue. Useful for type-checking. */ 130 lvalue. Useful for type-checking. */
129 #define NON_LVALUE(larg) ((larg) + 0) 131 #define NON_LVALUE(larg) ((larg) + 0)