[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109302: * lisp.h (SWITCH_ENUM_CAST):
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109302: * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed. |
Date: |
Mon, 30 Jul 2012 11:56:42 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109302
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2012-07-30 11:56:42 -0700
message:
* lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
This no-op macro hasn't been needed for many years.
* src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
modified:
admin/CPP-DEFINES
src/ChangeLog
src/alloc.c
src/data.c
src/keyboard.c
src/lisp.h
src/regex.c
src/syntax.c
src/xdisp.c
=== modified file 'admin/CPP-DEFINES'
--- a/admin/CPP-DEFINES 2012-07-17 11:52:00 +0000
+++ b/admin/CPP-DEFINES 2012-07-30 18:56:42 +0000
@@ -61,8 +61,6 @@
** Misc macros
USER_FULL_NAME If defined, overrides the default pw->pw_gecos for getting at
the full user name. Only MSDOS overrides the default.
-** Replace, the definition is trivial: SWITCH_ENUM_CAST
-
** Defines from src/s/*.h. Some of these might not be used in the code
anymore, so they can be removed. The HAVE_* definitions are probably handled
by autoconf, so it might be possible to just remove them from src/s/*.h.
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-07-30 18:44:51 +0000
+++ b/src/ChangeLog 2012-07-30 18:56:42 +0000
@@ -1,5 +1,9 @@
2012-07-30 Paul Eggert <address@hidden>
+ * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
+ This no-op macro hasn't been needed for many years.
+ * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
+
Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
* alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
* lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2012-07-30 18:44:51 +0000
+++ b/src/alloc.c 2012-07-30 18:56:42 +0000
@@ -5926,7 +5926,7 @@
#endif /* not GC_CHECK_MARKED_OBJECTS */
- switch (SWITCH_ENUM_CAST (XTYPE (obj)))
+ switch (XTYPE (obj))
{
case Lisp_String:
{
=== modified file 'src/data.c'
--- a/src/data.c 2012-07-29 22:42:12 +0000
+++ b/src/data.c 2012-07-30 18:56:42 +0000
@@ -2522,7 +2522,7 @@
ptrdiff_t ok_args;
EMACS_INT ok_accum;
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Alogior:
case Alogxor:
@@ -2557,7 +2557,7 @@
nargs, args);
args[argnum] = val;
next = XINT (args[argnum]);
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Aadd:
if (INT_ADD_OVERFLOW (accum, next))
@@ -2643,7 +2643,7 @@
args[argnum] = val; /* runs into a compiler bug. */
next = XINT (args[argnum]);
}
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Aadd:
accum += next;
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2012-07-30 06:43:46 +0000
+++ b/src/keyboard.c 2012-07-30 18:56:42 +0000
@@ -5319,7 +5319,7 @@
{
int i;
- switch (SWITCH_ENUM_CAST (event->kind))
+ switch (event->kind)
{
/* A simple keystroke. */
case ASCII_KEYSTROKE_EVENT:
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2012-07-30 18:44:51 +0000
+++ b/src/lisp.h 2012-07-30 18:56:42 +0000
@@ -3319,8 +3319,6 @@
#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))
#endif
-#define SWITCH_ENUM_CAST(x) (x)
-
/* Use this to suppress gcc's warnings. */
#ifdef lint
=== modified file 'src/regex.c'
--- a/src/regex.c 2012-07-29 08:18:29 +0000
+++ b/src/regex.c 2012-07-30 18:56:42 +0000
@@ -255,8 +255,6 @@
/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */
enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
-# define SWITCH_ENUM_CAST(x) (x)
-
/* Dummy macros for non-Emacs environments. */
# define CHAR_CHARSET(c) 0
# define CHARSET_LEADING_CODE_BASE(c) 0
@@ -3913,7 +3911,7 @@
as used for the *? operator. */
re_char *p1 = p;
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
+ switch (*p++)
{
case succeed:
return 1;
@@ -4088,7 +4086,7 @@
visited. `re_compile' should make sure this is true. */
break;
p += j;
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p))
+ switch (*p)
{
case on_failure_jump:
case on_failure_keep_string_jump:
@@ -4621,7 +4619,7 @@
static re_char *
skip_one_char (const re_char *p)
{
- switch (SWITCH_ENUM_CAST (*p++))
+ switch (*p++)
{
case anychar:
break;
@@ -4666,7 +4664,7 @@
int mcnt;
while (p < pend)
{
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p))
+ switch (*p)
{
case start_memory:
case stop_memory:
@@ -4711,7 +4709,7 @@
op2 = p2 == pend ? succeed : *p2;
- switch (SWITCH_ENUM_CAST (op2))
+ switch (op2)
{
case succeed:
case endbuf:
@@ -4835,7 +4833,7 @@
break;
case charset_not:
- switch (SWITCH_ENUM_CAST (*p1))
+ switch (*p1)
{
case exactn:
case charset:
@@ -5313,7 +5311,7 @@
}
/* Otherwise match next pattern command. */
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
+ switch (*p++)
{
/* Ignore these. Used to ignore the n of succeed_n's which
currently have n == 0. */
@@ -6235,7 +6233,7 @@
/* A restart point is known. Restore to that state. */
DEBUG_PRINT1 ("\nFAIL:\n");
POP_FAILURE_POINT (str, pat);
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *pat++))
+ switch (*pat++)
{
case on_failure_keep_string_jump:
assert (str == NULL);
=== modified file 'src/syntax.c'
--- a/src/syntax.c 2012-07-27 09:24:34 +0000
+++ b/src/syntax.c 2012-07-30 18:56:42 +0000
@@ -1152,7 +1152,7 @@
insert_string ("\twhich means: ");
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Swhitespace:
insert_string ("whitespace"); break;
@@ -2525,7 +2525,7 @@
if (prefix)
continue;
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Sescape:
case Scharquote:
@@ -2702,7 +2702,7 @@
else if (SYNTAX_FLAGS_PREFIX (syntax))
continue;
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Sword:
case Ssymbol:
@@ -3123,7 +3123,7 @@
if (SYNTAX_FLAGS_PREFIX (prev_from_syntax))
continue;
- switch (SWITCH_ENUM_CAST (code))
+ switch (code)
{
case Sescape:
case Scharquote:
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2012-07-30 06:43:46 +0000
+++ b/src/xdisp.c 2012-07-30 18:56:42 +0000
@@ -20414,7 +20414,7 @@
depth++;
- switch (SWITCH_ENUM_CAST (XTYPE (elt)))
+ switch (XTYPE (elt))
{
case Lisp_String:
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109302: * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.,
Paul Eggert <=