Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/lisp-disunion.h Wed Feb 10 07:15:36 2010 -0600 +++ b/src/lisp-disunion.h Wed Feb 10 07:25:19 2010 -0600 @@ -114,15 +114,17 @@ /* WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - You can only VOID_TO_LISP something that had previously been - LISP_TO_VOID'd. You cannot go the other way, i.e. create a bogus - Lisp_Object. If you want to stuff a void * into a Lisp_Object, use - make_opaque_ptr(). */ + You can only GET_LISP_FROM_VOID something that had previously been + STORE_LISP_IN_VOID'd. If you want to go the other way, use + STORE_VOID_IN_LISP and GET_VOID_FROM_LISP, or use make_opaque_ptr(). */ -/* Convert between a (void *) and a Lisp_Object, as when the - Lisp_Object is passed to a toolkit callback function */ -#define VOID_TO_LISP(varg) ((Lisp_Object) (varg)) -#define LISP_TO_VOID(larg) ((void *) (larg)) +/* Convert a Lisp object to a void * pointer, as when it needs to be passed + to a toolkit callback function */ +#define STORE_LISP_IN_VOID(larg) ((void *) (larg)) + +/* Convert a void * pointer back into a Lisp object, assuming that the + pointer was generated by STORE_LISP_IN_VOID. */ +#define GET_LISP_FROM_VOID(varg) ((Lisp_Object) (varg)) /* Convert a Lisp_Object into something that can't be used as an lvalue. Useful for type-checking. */