aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-10-04 13:12:44 +0000
committerKarl Heuer1994-10-04 13:12:44 +0000
commita94ef819c18ca432eccf42417f38a6f7e2741912 (patch)
tree4f2fadf61b1899fcd8aa50652c3a235263dc741b /src
parent90851bbe34a2fa089bcf6f3b7620c08acb3bcf8c (diff)
downloademacs-a94ef819c18ca432eccf42417f38a6f7e2741912.tar.gz
emacs-a94ef819c18ca432eccf42417f38a6f7e2741912.zip
(XSETINT, XSETCONS, XSETBUFFER, XSETVECTOR, XSETSUBR, XSETSTRING, XSETSYMBOL,
XSETMARKER, XSETOBJFWD, XSETWINDOW, XSETPROCESS, XSETFLOAT): Set object type as well as value. (XSETBOOLFWD, XSETBUFFER_OBJFWD, XSETWINDOW_CONFIGURATION, XSETINTERNAL_STREAM, XSETINTFWD, XSETINTERNAL): New macros. (XSETUINT, XSETPNTR, XFUNCTION, XSETFUNCTION, XSETINTPTR): Deleted.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h47
1 files changed, 18 insertions, 29 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 470dd6c211c..0b52401dac1 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -350,18 +350,6 @@ extern int pure_size;
350#endif /* not HAVE_SHM */ 350#endif /* not HAVE_SHM */
351#endif /* no XPNTR */ 351#endif /* no XPNTR */
352 352
353#ifndef XSETINT
354#define XSETINT(a, b) ((a) = ((a) & ~VALMASK) | ((b) & VALMASK))
355#endif
356
357#ifndef XSETUINT
358#define XSETUINT(a, b) XSETINT (a, b)
359#endif
360
361#ifndef XSETPNTR
362#define XSETPNTR(a, b) XSETINT (a, b)
363#endif
364
365#ifndef XSET 353#ifndef XSET
366#define XSET(var, type, ptr) \ 354#define XSET(var, type, ptr) \
367 ((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK)) 355 ((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
@@ -420,9 +408,6 @@ extern int pure_size;
420 408
421#define XUINT(a) ((a).u.val) 409#define XUINT(a) ((a).u.val)
422#define XPNTR(a) ((a).u.val) 410#define XPNTR(a) ((a).u.val)
423#define XSETINT(a, b) ((a).s.val = (int) (b))
424#define XSETUINT(a, b) ((a).s.val = (int) (b))
425#define XSETPNTR(a, b) ((a).s.val = (int) (b))
426 411
427#define XSET(var, vartype, ptr) \ 412#define XSET(var, vartype, ptr) \
428 (((var).s.type = ((char) (vartype))), ((var).s.val = ((int) (ptr)))) 413 (((var).s.type = ((char) (vartype))), ((var).s.val = ((int) (ptr))))
@@ -448,7 +433,6 @@ extern int pure_size;
448#define XSUBR(a) ((struct Lisp_Subr *) XPNTR(a)) 433#define XSUBR(a) ((struct Lisp_Subr *) XPNTR(a))
449#define XSTRING(a) ((struct Lisp_String *) XPNTR(a)) 434#define XSTRING(a) ((struct Lisp_String *) XPNTR(a))
450#define XSYMBOL(a) ((struct Lisp_Symbol *) XPNTR(a)) 435#define XSYMBOL(a) ((struct Lisp_Symbol *) XPNTR(a))
451#define XFUNCTION(a) ((Lisp_Object (*)()) XPNTR(a))
452#define XMARKER(a) ((struct Lisp_Marker *) XPNTR(a)) 436#define XMARKER(a) ((struct Lisp_Marker *) XPNTR(a))
453#define XOBJFWD(a) ((Lisp_Object *) XPNTR(a)) 437#define XOBJFWD(a) ((Lisp_Object *) XPNTR(a))
454#define XINTPTR(a) ((int *) XPNTR(a)) 438#define XINTPTR(a) ((int *) XPNTR(a))
@@ -456,19 +440,24 @@ extern int pure_size;
456#define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a)) 440#define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a))
457#define XFLOAT(a) ((struct Lisp_Float *) XPNTR(a)) 441#define XFLOAT(a) ((struct Lisp_Float *) XPNTR(a))
458 442
459#define XSETCONS(a, b) XSETPNTR(a, (EMACS_INT) (b)) 443#define XSETINT(a, b) XSET (a, Lisp_Int, b)
460#define XSETBUFFER(a, b) XSETPNTR(a, (EMACS_INT) (b)) 444#define XSETCONS(a, b) XSET (a, Lisp_Cons, b)
461#define XSETVECTOR(a, b) XSETPNTR(a, (EMACS_INT) (b)) 445#define XSETBUFFER(a, b) XSET (a, Lisp_Buffer, b)
462#define XSETSUBR(a, b) XSETPNTR(a, (EMACS_INT) (b)) 446#define XSETVECTOR(a, b) XSET (a, Lisp_Vector, b)
463#define XSETSTRING(a, b) XSETPNTR(a, (EMACS_INT) (b)) 447#define XSETSUBR(a, b) XSET (a, Lisp_Subr, b)
464#define XSETSYMBOL(a, b) XSETPNTR(a, (EMACS_INT) (b)) 448#define XSETSTRING(a, b) XSET (a, Lisp_String, b)
465#define XSETFUNCTION(a, b) XSETPNTR(a, (EMACS_INT) (b)) 449#define XSETSYMBOL(a, b) XSET (a, Lisp_Symbol, b)
466#define XSETMARKER(a, b) XSETPNTR(a, (EMACS_INT) (b)) 450#define XSETMARKER(a, b) XSET (a, Lisp_Marker, b)
467#define XSETOBJFWD(a, b) XSETPNTR(a, (EMACS_INT) (b)) 451#define XSETOBJFWD(a, b) XSET (a, Lisp_Objfwd, b)
468#define XSETINTPTR(a, b) XSETPNTR(a, (EMACS_INT) (b)) 452#define XSETWINDOW(a, b) XSET (a, Lisp_Window, b)
469#define XSETWINDOW(a, b) XSETPNTR(a, (EMACS_INT) (b)) 453#define XSETPROCESS(a, b) XSET (a, Lisp_Process, b)
470#define XSETPROCESS(a, b) XSETPNTR(a, (EMACS_INT) (b)) 454#define XSETFLOAT(a, b) XSET (a, Lisp_Float, b)
471#define XSETFLOAT(a, b) XSETPNTR(a, (EMACS_INT) (b)) 455#define XSETBOOLFWD(a, b) XSET (a, Lisp_Boolfwd, b)
456#define XSETBUFFER_OBJFWD(a, b) XSET (a, Lisp_Buffer_Objfwd, b)
457#define XSETWINDOW_CONFIGURATION(a, b) XSET (a, Lisp_Window_Configuration, b)
458#define XSETINTERNAL_STREAM(a, b) XSET (a, Lisp_Internal_Stream, b)
459#define XSETINTFWD(a, b) XSET (a, Lisp_Intfwd, b)
460#define XSETINTERNAL(a, b) XSET (a, Lisp_Internal, b)
472 461
473#ifdef USE_TEXT_PROPERTIES 462#ifdef USE_TEXT_PROPERTIES
474/* Basic data type for use of intervals. See the macros in intervals.h */ 463/* Basic data type for use of intervals. See the macros in intervals.h */