(linenum→info "unix/slp.c:2238")

emacs/22.1/src/lisp.h

    1: /* Fundamental definitions for GNU Emacs Lisp interpreter.
    2:    Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
    3:                  2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
    4: 
    5: This file is part of GNU Emacs.
    6: 
    7: GNU Emacs is free software; you can redistribute it and/or modify
    8: it under the terms of the GNU General Public License as published by
    9: the Free Software Foundation; either version 2, or (at your option)
   10: any later version.
   11: 
   12: GNU Emacs is distributed in the hope that it will be useful,
   13: but WITHOUT ANY WARRANTY; without even the implied warranty of
   14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15: GNU General Public License for more details.
   16: 
   17: You should have received a copy of the GNU General Public License
   18: along with GNU Emacs; see the file COPYING.  If not, write to
   19: the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   20: Boston, MA 02110-1301, USA.  */
   21: 
   22: #ifndef EMACS_LISP_H
   23: #define EMACS_LISP_H
   24: 
   25: /* Declare the prototype for a general external function.  */
   26: #if defined (PROTOTYPES) || defined (WINDOWSNT)
   27: #define P_(proto) proto
   28: #else
   29: #define P_(proto) ()
   30: #endif
   31: 
   32: #if 0
   33: /* Define this temporarily to hunt a bug.  If defined, the size of
   34:    strings is redundantly recorded in sdata structures so that it can
   35:    be compared to the sizes recorded in Lisp strings.  */
   36: 
   37: #define GC_CHECK_STRING_BYTES 1
   38: 
   39: /* Define this to check for short string overrun.  */
   40: 
   41: #define GC_CHECK_STRING_OVERRUN 1
   42: 
   43: /* Define this to check the string free list.  */
   44: 
   45: #define GC_CHECK_STRING_FREE_LIST 1
   46: 
   47: /* Define this to check for malloc buffer overrun.  */
   48: 
   49: #define XMALLOC_OVERRUN_CHECK 1
   50: 
   51: /* Define this to check for errors in cons list.  */
   52: /* #define GC_CHECK_CONS_LIST 1 */
   53: 
   54: #endif /* 0 */
   55: 
   56: #ifdef GC_CHECK_CONS_LIST
   57: #define CHECK_CONS_LIST() check_cons_list()
   58: #else
   59: #define CHECK_CONS_LIST() 0
   60: #endif
   61: 
   62: /* These are default choices for the types to use.  */
   63: #ifdef _LP64
   64: #ifndef EMACS_INT
   65: #define EMACS_INT long
   66: #define BITS_PER_EMACS_INT BITS_PER_LONG
   67: #endif
   68: #ifndef EMACS_UINT
   69: #define EMACS_UINT unsigned long
   70: #endif
   71: #else /* not _LP64 */
   72: #ifndef EMACS_INT
   73: #define EMACS_INT int
   74: #define BITS_PER_EMACS_INT BITS_PER_INT
   75: #endif
   76: #ifndef EMACS_UINT
   77: #define EMACS_UINT unsigned int
   78: #endif
   79: #endif
   80: 
   81: /* Extra internal type checking?  */
   82: extern int suppress_checking;
   83: extern void die P_((const char *, const char *, int)) NO_RETURN;
   84: 
   85: #ifdef ENABLE_CHECKING
   86: 
   87: #define CHECK(check,msg) (((check) || suppress_checking         \
   88:                            ? (void) 0                                \
   89:                            : die ((msg), __FILE__, __LINE__)),       \
   90:                           0)
   91: #else
   92: 
   93: /* Produce same side effects and result, but don't complain.  */
   94: #define CHECK(check,msg) ((check),0)
   95: 
   96: #endif
   97: 
   98: /* Used for making sure that Emacs is compilable in all
   99:    configurations.  */
  100: 
  101: #ifdef USE_LISP_UNION_TYPE
  102: #undef NO_UNION_TYPE
  103: #endif
  104: 
  105: /* Define an Emacs version of "assert", since some system ones are
  106:    flaky.  */
  107: #ifndef ENABLE_CHECKING
  108: #define eassert(X)      (void) 0
  109: #else /* ENABLE_CHECKING */
  110: #if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__)
  111: #define eassert(cond) CHECK(cond,"assertion failed: " #cond)
  112: #else
  113: #define eassert(cond) CHECK(cond,"assertion failed")
  114: #endif
  115: #endif /* ENABLE_CHECKING */
  116: 
  117: /* Define the fundamental Lisp data structures.  */
  118: 
  119: /* This is the set of Lisp data types.  */
  120: 
  121: enum Lisp_Type
  122:   {
  123:     /* Integer.  XINT (obj) is the integer value.  */
  124:     Lisp_Int,
  125: 
  126:     /* Symbol.  XSYMBOL (object) points to a struct Lisp_Symbol.  */
  127:     Lisp_Symbol,
  128: 
  129:     /* Miscellaneous.  XMISC (object) points to a union Lisp_Misc,
  130:        whose first member indicates the subtype.  */
  131:     Lisp_Misc,
  132: 
  133:     /* String.  XSTRING (object) points to a struct Lisp_String.
  134:        The length of the string, and its contents, are stored therein.  */
  135:     Lisp_String,
  136: 
  137:     /* Vector of Lisp objects, or something resembling it.
  138:        XVECTOR (object) points to a struct Lisp_Vector, which contains
  139:        the size and contents.  The size field also contains the type
  140:        information, if it's not a real vector object.  */
  141:     Lisp_Vectorlike,
  142: 
  143:     /* Cons.  XCONS (object) points to a struct Lisp_Cons.  */
  144:     Lisp_Cons,
  145: 
  146:     Lisp_Float,
  147: 
  148:     /* This is not a type code.  It is for range checking.  */
  149:     Lisp_Type_Limit
  150:   };
  151: 
  152: /* This is the set of data types that share a common structure.
  153:    The first member of the structure is a type code from this set.
  154:    The enum values are arbitrary, but we'll use large numbers to make it
  155:    more likely that we'll spot the error if a random word in memory is
  156:    mistakenly interpreted as a Lisp_Misc.  */
  157: enum Lisp_Misc_Type
  158:   {
  159:     Lisp_Misc_Free = 0x5eab,
  160:     Lisp_Misc_Marker,
  161:     Lisp_Misc_Intfwd,
  162:     Lisp_Misc_Boolfwd,
  163:     Lisp_Misc_Objfwd,
  164:     Lisp_Misc_Buffer_Objfwd,
  165:     Lisp_Misc_Buffer_Local_Value,
  166:     Lisp_Misc_Some_Buffer_Local_Value,
  167:     Lisp_Misc_Overlay,
  168:     Lisp_Misc_Kboard_Objfwd,
  169:     Lisp_Misc_Save_Value,
  170:     /* Currently floats are not a misc type,
  171:        but let's define this in case we want to change that.  */
  172:     Lisp_Misc_Float,
  173:     /* This is not a type code.  It is for range checking.  */
  174:     Lisp_Misc_Limit
  175:   };
  176: 
  177: #ifndef GCTYPEBITS
  178: #define GCTYPEBITS 3
  179: #endif
  180: 
  181: /* These values are overridden by the m- file on some machines.  */
  182: #ifndef VALBITS
  183: #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)
  184: #endif
  185: 
  186: #ifndef NO_UNION_TYPE
  187: 
  188: #ifndef WORDS_BIG_ENDIAN
  189: 
  190: /* Definition of Lisp_Object for little-endian machines.  */
  191: 
  192: typedef
  193: union Lisp_Object
  194:   {
  195:     /* Used for comparing two Lisp_Objects;
  196:        also, positive integers can be accessed fast this way.  */
  197:     EMACS_INT i;
  198: 
  199:     struct
  200:       {
  201:         EMACS_INT val  : VALBITS;
  202:         enum Lisp_Type type : GCTYPEBITS;
  203:       } s;
  204:     struct
  205:       {
  206:         EMACS_UINT val : VALBITS;
  207:         enum Lisp_Type type : GCTYPEBITS;
  208:       } u;
  209:   }
  210: Lisp_Object;
  211: 
  212: #else /* If WORDS_BIG_ENDIAN */
  213: 
  214: typedef
  215: union Lisp_Object
  216:   {
  217:     /* Used for comparing two Lisp_Objects;
  218:        also, positive integers can be accessed fast this way.  */
  219:     EMACS_INT i;
  220: 
  221:     struct
  222:       {
  223:         enum Lisp_Type type : GCTYPEBITS;
  224:         EMACS_INT val  : VALBITS;
  225:       } s;
  226:     struct
  227:       {
  228:         enum Lisp_Type type : GCTYPEBITS;
  229:         EMACS_UINT val : VALBITS;
  230:       } u;
  231:   }
  232: Lisp_Object;
  233: 
  234: #endif /* WORDS_BIG_ENDIAN */
  235: 
  236: #ifdef __GNUC__
  237: static __inline__ Lisp_Object
  238: LISP_MAKE_RVALUE (Lisp_Object o)
  239: {
  240:     return o;
  241: }
  242: #else
  243: /* This isn't quite right - it keeps the argument as an lvalue.
  244:    Making it const via casting would help avoid code actually
  245:    modifying the location in question, but the casting could cover
  246:    other type-related bugs.  */
  247: #define LISP_MAKE_RVALUE(o) (o)
  248: #endif
  249: 
  250: #endif /* NO_UNION_TYPE */
  251: 
  252: 
  253: /* If union type is not wanted, define Lisp_Object as just a number.  */
  254: 
  255: #ifdef NO_UNION_TYPE
  256: typedef EMACS_INT Lisp_Object;
  257: #define LISP_MAKE_RVALUE(o) (0+(o))
  258: #endif /* NO_UNION_TYPE */
  259: 
  260: /* Two flags that are set during GC.  On some machines, these flags
  261:    are defined differently by the m- file.  */
  262: 
  263: /* In the size word of a vector, this bit means the vector has been marked.  */
  264: 
  265: #ifndef ARRAY_MARK_FLAG
  266: #define ARRAY_MARK_FLAG ((EMACS_INT) ((EMACS_UINT) 1 << (VALBITS + GCTYPEBITS - 1)))
  267: #endif /* no ARRAY_MARK_FLAG */
  268: 
  269: /* In the size word of a struct Lisp_Vector, this bit means it's really
  270:    some other vector-like object.  */
  271: #ifndef PSEUDOVECTOR_FLAG
  272: #define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1) & ~ARRAY_MARK_FLAG)
  273: #endif
  274: 
  275: /* In a pseudovector, the size field actually contains a word with one
  276:    PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
  277:    indicate the actual type.  */
  278: enum pvec_type
  279: {
  280:   PVEC_NORMAL_VECTOR = 0,
  281:   PVEC_PROCESS = 0x200,
  282:   PVEC_FRAME = 0x400,
  283:   PVEC_COMPILED = 0x800,
  284:   PVEC_WINDOW = 0x1000,
  285:   PVEC_WINDOW_CONFIGURATION = 0x2000,
  286:   PVEC_SUBR = 0x4000,
  287:   PVEC_CHAR_TABLE = 0x8000,
  288:   PVEC_BOOL_VECTOR = 0x10000,
  289:   PVEC_BUFFER = 0x20000,
  290:   PVEC_HASH_TABLE = 0x40000,
  291:   PVEC_TYPE_MASK = 0x7fe00
  292: 
  293: #if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to
  294:          GDB.  It doesn't work on OS Alpha.  Moved to a variable in
  295:          emacs.c.  */
  296:   PVEC_FLAG = PSEUDOVECTOR_FLAG
  297: #endif
  298: };
  299: 
  300: /* For convenience, we also store the number of elements in these bits.
  301:    Note that this size is not necessarily the memory-footprint size, but
  302:    only the number of Lisp_Object fields (that need to be traced by the GC).
  303:    The distinction is used e.g. by Lisp_Process which places extra
  304:    non-Lisp_Object fields at the end of the structure.  */
  305: #define PSEUDOVECTOR_SIZE_MASK 0x1ff
  306: 
  307: /* Number of bits to put in each character in the internal representation
  308:    of bool vectors.  This should not vary across implementations.  */
  309: #define BOOL_VECTOR_BITS_PER_CHAR 8
  310: ^L
  311: /***** Select the tagging scheme.  *****/
  312: /* There are basically two options that control the tagging scheme:
  313:    - NO_UNION_TYPE says that Lisp_Object should be an integer instead
  314:      of a union.
  315:    - USE_LSB_TAG means that we can assume the least 3 bits of pointers are
  316:      always 0, and we can thus use them to hold tag bits, without
  317:      restricting our addressing space.
  318: 
  319:    If USE_LSB_TAG is not set, then we use the top 3 bits for tagging, thus
  320:    restricting our possible address range.  Currently USE_LSB_TAG is not
  321:    allowed together with a union.  This is not due to any fundamental
  322:    technical (or political ;-) problem: nobody wrote the code to do it yet.
  323: 
  324:    USE_LSB_TAG not only requires the least 3 bits of pointers returned by
  325:    malloc to be 0 but also needs to be able to impose a mult-of-8 alignment
  326:    on the few static Lisp_Objects used: all the defsubr as well
  327:    as the two special buffers buffer_defaults and buffer_local_symbols.  */
  328: 
  329: /* First, try and define DECL_ALIGN(type,var) which declares a static
  330:    variable VAR of type TYPE with the added requirement that it be
  331:    TYPEBITS-aligned. */
  332: #ifndef NO_DECL_ALIGN
  333: # ifndef DECL_ALIGN
  334: /* What compiler directive should we use for non-gcc compilers?  -stef  */
  335: #  if defined (__GNUC__)
  336: #   define DECL_ALIGN(type, var) \
  337:      type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
  338: #  endif
  339: # endif
  340: #endif
  341: 
  342: /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8.  */
  343: #if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined MAC_OSX
  344: /* We also need to be able to specify mult-of-8 alignment on static vars.  */
  345: # if defined DECL_ALIGN
  346: /* We currently do not support USE_LSB_TAG with a union Lisp_Object.  */
  347: #  if defined NO_UNION_TYPE
  348: #   define USE_LSB_TAG
  349: #  endif
  350: # endif
  351: #endif
  352: 
  353: /* If we cannot use 8-byte alignment, make DECL_ALIGN a no-op.  */
  354: #ifndef DECL_ALIGN
  355: # ifdef USE_LSB_TAG
  356: #  error "USE_LSB_TAG used without defining DECL_ALIGN"
  357: # endif
  358: # define DECL_ALIGN(type, var) type var
  359: #endif
  360: 
  361: ^L
  362: /* These macros extract various sorts of values from a Lisp_Object.
  363:  For example, if tem is a Lisp_Object whose type is Lisp_Cons,
  364:  XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons.  */
  365: 
  366: #ifdef NO_UNION_TYPE
  367: 
  368: #ifdef USE_LSB_TAG
  369: 
  370: #define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1)
  371: #define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) & TYPEMASK))
  372: #define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS)
  373: #define XUINT(a) (((EMACS_UINT) (a)) >> GCTYPEBITS)
  374: #define XSET(var, type, ptr)                                    \
  375:     (eassert (XTYPE (ptr) == 0), /* Check alignment.  */        \
  376:      (var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr)))
  377: #define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS)
  378: 
  379: /* XFASTINT and XSETFASTINT are for use when the integer is known to be
  380:    positive, in which case the implementation can sometimes be faster
  381:    depending on the tagging scheme.  With USE_LSB_TAG, there's no benefit.  */
  382: #define XFASTINT(a) XINT (a)
  383: #define XSETFASTINT(a, b) ((a) = make_number (b))
  384: 
  385: #define XPNTR(a) ((EMACS_INT) ((a) & ~TYPEMASK))
  386: 
  387: #else  /* not USE_LSB_TAG */
  388: 
  389: #define VALMASK ((((EMACS_INT) 1) << VALBITS) - 1)
  390: 
  391: /* One need to override this if there must be high bits set in data space
  392:    (doing the result of the below & ((1 << (GCTYPE + 1)) - 1) would work
  393:     on all machines, but would penalize machines which don't need it)
  394:  */
  395: #define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) >> VALBITS))
  396: 
  397: /* For integers known to be positive, XFASTINT provides fast retrieval
  398:    and XSETFASTINT provides fast storage.  This takes advantage of the
  399:    fact that Lisp_Int is 0.  */
  400: #define XFASTINT(a) ((a) + 0)
  401: #define XSETFASTINT(a, b) ((a) = (b))
  402: 
  403: /* Extract the value of a Lisp_Object as a signed integer.  */
  404: 
  405: #ifndef XINT   /* Some machines need to do this differently.  */
  406: #define XINT(a) ((((EMACS_INT) (a)) << (BITS_PER_EMACS_INT - VALBITS))  \
  407:                  >> (BITS_PER_EMACS_INT - VALBITS))
  408: #endif
  409: 
  410: /* Extract the value as an unsigned integer.  This is a basis
  411:    for extracting it as a pointer to a structure in storage.  */
  412: 
  413: #ifndef XUINT
  414: #define XUINT(a) ((EMACS_UINT) ((a) & VALMASK))
  415: #endif
  416: 
  417: #ifndef XSET
  418: #define XSET(var, type, ptr) \
  419:    ((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
  420: #endif
  421: 
  422: /* Convert a C integer into a Lisp_Object integer.  */
  423: 
  424: #define make_number(N)          \
  425:   ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
  426: 
  427: #endif /* not USE_LSB_TAG */
  428: 
  429: #define EQ(x, y) ((x) == (y))
  430: 
  431: #else /* not NO_UNION_TYPE */
  432: 
  433: #define XTYPE(a) ((enum Lisp_Type) (a).u.type)
  434: 
  435: /* For integers known to be positive, XFASTINT provides fast retrieval
  436:    and XSETFASTINT provides fast storage.  This takes advantage of the
  437:    fact that Lisp_Int is 0.  */
  438: #define XFASTINT(a) ((a).i + 0)
  439: #define XSETFASTINT(a, b) ((a).i = (b))
  440: 
  441: #ifdef EXPLICIT_SIGN_EXTEND
  442: /* Make sure we sign-extend; compilers have been known to fail to do so.  */
  443: #define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \
  444:                  >> (BITS_PER_EMACS_INT - VALBITS))
  445: #else
  446: #define XINT(a) ((a).s.val)
  447: #endif /* EXPLICIT_SIGN_EXTEND */
  448: 
  449: #define XUINT(a) ((a).u.val)
  450: 
  451: #define XSET(var, vartype, ptr) \
  452:    (((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype))))
  453: 
  454: #if __GNUC__ >= 2 && defined (__OPTIMIZE__)
  455: #define make_number(N) \
  456:   (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
  457: #else
  458: extern Lisp_Object make_number P_ ((EMACS_INT));
  459: #endif
  460: 
  461: #define EQ(x, y) ((x).i == (y).i)
  462: 
  463: #endif /* NO_UNION_TYPE */
  464: 
  465: /* During garbage collection, XGCTYPE must be used for extracting types
  466:  so that the mark bit is ignored.  XMARKBIT accesses the markbit.
  467:  Markbits are used only in particular slots of particular structure types.
  468:  Other markbits are always zero.
  469:  Outside of garbage collection, all mark bits are always zero.  */
  470: 
  471: #ifndef XGCTYPE
  472: /* The distinction does not exist now that the MARKBIT has been eliminated.  */
  473: #define XGCTYPE(a) XTYPE (a)
  474: #endif
  475: 
  476: #ifndef XPNTR
  477: #ifdef HAVE_SHM
  478: /* In this representation, data is found in two widely separated segments.  */
  479: extern size_t pure_size;
  480: #define XPNTR(a) \
  481:   (XUINT (a) | (XUINT (a) > pure_size ? DATA_SEG_BITS : PURE_SEG_BITS))
  482: #else /* not HAVE_SHM */
  483: #ifdef DATA_SEG_BITS
  484: /* This case is used for the rt-pc.
  485:    In the diffs I was given, it checked for ptr = 0
  486:    and did not adjust it in that case.
  487:    But I don't think that zero should ever be found
  488:    in a Lisp object whose data type says it points to something.  */
  489: #define XPNTR(a) (XUINT (a) | DATA_SEG_BITS)
  490: #else
  491: /* Some versions of gcc seem to consider the bitfield width when
  492:    issuing the "cast to pointer from integer of different size"
  493:    warning, so the cast is here to widen the value back to its natural
  494:    size.  */
  495: #define XPNTR(a) ((EMACS_INT) XUINT (a))
  496: #endif
  497: #endif /* not HAVE_SHM */
  498: #endif /* no XPNTR */
  499: 
  500: /* Largest and smallest representable fixnum values.  These are the C
  501:    values.  */
  502: 
  503: #define MOST_NEGATIVE_FIXNUM    - ((EMACS_INT) 1 << (VALBITS - 1))
  504: #define MOST_POSITIVE_FIXNUM    (((EMACS_INT) 1 << (VALBITS - 1)) - 1)
  505: /* Mask indicating the significant bits of a Lisp_Int.
  506:    I.e. (x & INTMASK) == XUINT (make_number (x)).  */
  507: #define INTMASK ((((EMACS_INT) 1) << VALBITS) - 1)
  508: 
  509: /* Value is non-zero if C integer I doesn't fit into a Lisp fixnum.  */
  510: 
  511: #define FIXNUM_OVERFLOW_P(i) \
  512:   ((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \
  513:    || (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM)
  514: 
  515: /* Extract a value or address from a Lisp_Object.  */
  516: 
  517: #define XCONS(a) (eassert (GC_CONSP(a)),(struct Lisp_Cons *) XPNTR(a))
  518: #define XVECTOR(a) (eassert (GC_VECTORLIKEP(a)),(struct Lisp_Vector *) XPNTR(a))
  519: #define XSTRING(a) (eassert (GC_STRINGP(a)),(struct Lisp_String *) XPNTR(a))
  520: #define XSYMBOL(a) (eassert (GC_SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a))
  521: #define XFLOAT(a) (eassert (GC_FLOATP(a)),(struct Lisp_Float *) XPNTR(a))
  522: 
  523: /* Misc types.  */
  524: 
  525: #define XMISC(a)   ((union Lisp_Misc *) XPNTR(a))
  526: #define XMISCTYPE(a)   (XMARKER (a)->type)
  527: #define XMARKER(a) (&(XMISC(a)->u_marker))
  528: #define XINTFWD(a) (&(XMISC(a)->u_intfwd))
  529: #define XBOOLFWD(a) (&(XMISC(a)->u_boolfwd))
  530: #define XOBJFWD(a) (&(XMISC(a)->u_objfwd))
  531: #define XBUFFER_OBJFWD(a) (&(XMISC(a)->u_buffer_objfwd))
  532: #define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value))
  533: #define XOVERLAY(a) (&(XMISC(a)->u_overlay))
  534: #define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd))
  535: #define XSAVE_VALUE(a) (&(XMISC(a)->u_save_value))
  536: 
  537: /* Pseudovector types.  */
  538: 
  539: #define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a))
  540: #define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a))
  541: #define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a))
  542: #define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a))
  543: #define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a))
  544: #define XBOOL_VECTOR(a) ((struct Lisp_Bool_Vector *) XPNTR(a))
  545: 
  546: /* Construct a Lisp_Object from a value or address.  */
  547: 
  548: #define XSETINT(a, b) (a) = make_number (b)
  549: #define XSETCONS(a, b) XSET (a, Lisp_Cons, b)
  550: #define XSETVECTOR(a, b) XSET (a, Lisp_Vectorlike, b)