[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113250: Prefer plain 'static' to 'static inline'.
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r113250: Prefer plain 'static' to 'static inline'. |
Date: |
Tue, 02 Jul 2013 00:33:08 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113250
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/12541
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2013-07-01 17:33:04 -0700
message:
Prefer plain 'static' to 'static inline'.
I missed these instances of 'static inline' in an earlier sweep.
* ebrowse.c (putstr):
* etags.c (hash):
* make-docfile.c (put_char): No longer inline.
* etags.c (hash): Prefer int to unsigned when either will do.
modified:
lib-src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1608
lib-src/ebrowse.c ebrowse.c-20091113204419-o5vbwnq5f7feedwu-1798
lib-src/etags.c etags.c-20091113204419-o5vbwnq5f7feedwu-216
lib-src/make-docfile.c
makedocfile.c-20091113204419-o5vbwnq5f7feedwu-33
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2013-06-21 20:27:13 +0000
+++ b/lib-src/ChangeLog 2013-07-02 00:33:04 +0000
@@ -1,5 +1,12 @@
2013-06-21 Paul Eggert <address@hidden>
+ Prefer plain 'static' to 'static inline' (Bug#12541).
+ I missed these instances of 'static inline' in an earlier sweep.
+ * ebrowse.c (putstr):
+ * etags.c (hash):
+ * make-docfile.c (put_char): No longer inline.
+ * etags.c (hash): Prefer int to unsigned when either will do.
+
Use C99-style flexible array members if available.
* ebrowse.c: Include <stddef.h>, for offsetof.
(struct member, struct alias, struct sym):
=== modified file 'lib-src/ebrowse.c'
--- a/lib-src/ebrowse.c 2013-06-21 20:27:13 +0000
+++ b/lib-src/ebrowse.c 2013-07-02 00:33:04 +0000
@@ -1096,7 +1096,7 @@
/* Write string S to the output file FP in a Lisp-readable form.
If S is null, write out `()'. */
-static inline void
+static void
putstr (const char *s, FILE *fp)
{
if (!s)
=== modified file 'lib-src/etags.c'
--- a/lib-src/etags.c 2013-05-18 05:32:17 +0000
+++ b/lib-src/etags.c 2013-07-02 00:33:04 +0000
@@ -2240,10 +2240,6 @@
st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef
};
-static unsigned int hash (const char *, unsigned int);
-static struct C_stab_entry * in_word_set (const char *, unsigned int);
-static enum sym_type C_symtype (char *, int, int);
-
/* Feed stuff between (but not including) %[ and %] lines to:
gperf -m 5
%[
@@ -2302,10 +2298,10 @@
struct C_stab_entry { const char *name; int c_ext; enum sym_type type; };
/* maximum key range = 33, duplicates = 0 */
-static inline unsigned int
-hash (register const char *str, register unsigned int len)
+static int
+hash (const char *str, int len)
{
- static unsigned char asso_values[] =
+ static char const asso_values[] =
{
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -2334,15 +2330,15 @@
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35
};
- register int hval = len;
+ int hval = len;
switch (hval)
{
default:
- hval += asso_values[(unsigned char)str[2]];
+ hval += asso_values[(unsigned char) str[2]];
/*FALLTHROUGH*/
case 2:
- hval += asso_values[(unsigned char)str[1]];
+ hval += asso_values[(unsigned char) str[1]];
break;
}
return hval;
@@ -2400,11 +2396,11 @@
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
- register const char *s = wordlist[key].name;
+ const char *s = wordlist[key].name;
if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] ==
'\0')
return &wordlist[key];
=== modified file 'lib-src/make-docfile.c'
--- a/lib-src/make-docfile.c 2013-05-06 03:32:19 +0000
+++ b/lib-src/make-docfile.c 2013-07-02 00:33:04 +0000
@@ -276,7 +276,7 @@
/* Output CH to the file or buffer in STATE. Any pending newlines or
spaces are output first. */
-static inline void
+static void
put_char (int ch, struct rcsoc_state *state)
{
int out_ch;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113250: Prefer plain 'static' to 'static inline'.,
Paul Eggert <=