emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109278: * lisp.h (LISP_INT_TAG, LISP


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109278: * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
Date: Sun, 29 Jul 2012 15:42:12 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109278
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2012-07-29 15:42:12 -0700
message:
  * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
  
  These macros are confusing and no longer need to be defined, as
  the enum values now suffice.  Each use replaced with definiens.
  (Lisp_Int1, Lisp_String): Define directly; this is clearer.
modified:
  src/ChangeLog
  src/buffer.c
  src/data.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-29 17:20:16 +0000
+++ b/src/ChangeLog     2012-07-29 22:42:12 +0000
@@ -1,3 +1,10 @@
+2012-07-29  Paul Eggert  <address@hidden>
+
+       * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
+       These macros are confusing and no longer need to be defined, as
+       the enum values now suffice.  All uses replaced with definiens.
+       (Lisp_Int1, Lisp_String): Define directly; this is clearer.
+
 2012-07-29  Juanma Barranquero  <address@hidden>
 
        * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2012-07-28 23:05:32 +0000
+++ b/src/buffer.c      2012-07-29 22:42:12 +0000
@@ -5457,17 +5457,17 @@
                     doc: /* Non-nil if searches and matches should ignore 
case.  */);
 
   DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
-                    make_number (LISP_INT_TAG),
+                    make_number (Lisp_Int0),
                     doc: /* Column beyond which automatic line-wrapping should 
happen.
 Interactively, you can set the buffer local value using \\[set-fill-column].  
*/);
 
   DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
-                    make_number (LISP_INT_TAG),
+                    make_number (Lisp_Int0),
                     doc: /* Column for the default `indent-line-function' to 
indent to.
 Linefeed indents to this column in Fundamental mode.  */);
 
   DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
-                    make_number (LISP_INT_TAG),
+                    make_number (Lisp_Int0),
                     doc: /* Distance between tab stops (for display of tab 
characters), in columns.
 This should be an integer greater than zero.  */);
 
@@ -5588,7 +5588,7 @@
 Backing up is done before the first time the file is saved.  */);
 
   DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
-                    make_number (LISP_INT_TAG),
+                    make_number (Lisp_Int0),
                     doc: /* Length of current buffer when last read in, saved 
or auto-saved.
 0 initially.
 -1 means auto-saving turned off until next real save.

=== modified file 'src/data.c'
--- a/src/data.c        2012-07-26 01:27:33 +0000
+++ b/src/data.c        2012-07-29 22:42:12 +0000
@@ -928,7 +928,7 @@
        Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype;
 
        if (!(NILP (type) || NILP (newval)
-             || (XINT (type) == LISP_INT_TAG
+             || (XINT (type) == Lisp_Int0
                  ? INTEGERP (newval)
                  : XTYPE (newval) == XINT (type))))
          buffer_slot_type_mismatch (newval, XINT (type));

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-07-29 17:14:51 +0000
+++ b/src/lisp.h        2012-07-29 22:42:12 +0000
@@ -213,11 +213,8 @@
 /* Lisp integers use 2 tags, to give them one extra bit, thus
    extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1.  */
 #define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1))
-#define LISP_INT_TAG Lisp_Int0
 #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
-#define LISP_INT1_TAG (USE_LSB_TAG ? 1 << INTTYPEBITS : 1)
-#define LISP_STRING_TAG (5 - LISP_INT1_TAG)
-#define LISP_INT_TAG_P(x) (((x) & ~LISP_INT1_TAG) == 0)
+#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
 
 /* Stolen from GDB.  The only known compiler that doesn't support
    enums in bitfields is MSVC.  */
@@ -232,7 +229,7 @@
   {
     /* Integer.  XINT (obj) is the integer value.  */
     Lisp_Int0 = 0,
-    Lisp_Int1 = LISP_INT1_TAG,
+    Lisp_Int1 = USE_LSB_TAG ? 1 << INTTYPEBITS : 1,
 
     /* Symbol.  XSYMBOL (object) points to a struct Lisp_Symbol.  */
     Lisp_Symbol = 2,
@@ -243,7 +240,7 @@
 
     /* String.  XSTRING (object) points to a struct Lisp_String.
        The length of the string, and its contents, are stored therein.  */
-    Lisp_String = LISP_STRING_TAG,
+    Lisp_String = USE_LSB_TAG ? 1 : 1 << INTTYPEBITS,
 
     /* Vector of Lisp objects, or something resembling it.
        XVECTOR (object) points to a struct Lisp_Vector, which contains


reply via email to

[Prev in Thread] Current Thread [Next in Thread]