Commit eefc9486 authored by Paul Eggert's avatar Paul Eggert
Browse files

Use 'inline', not 'INLINE'.

[ChangeLog]
* configure.in (INLINE): Remove.
[lib-src/ChangeLog]
* etags.c (hash): Now inline unconditionally.
* make-docfile.c (put_char): inline, not INLINE.
[nt/ChangeLog]
* config.nt (INLINE): Remove.
[src/ChangeLog]
<http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
* alloc.c, fontset.c (INLINE): Remove.
* alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
* intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
* xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
* gmalloc.c (register_heapinfo): Use inline unconditionally.
* lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
parents 738db178 aa1a7eb8
2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
Use 'inline', not 'INLINE'.
* configure.in (INLINE): Remove.
2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
Adjust to recent gnulib change for @GUARD_PREFIX@.
......
......@@ -1286,9 +1286,6 @@ dnl and void *.
AC_C_PROTOTYPES
AC_C_VOLATILE
AC_C_CONST
dnl This isn't useful because we can't turn on use of `inline' unless
dnl the compiler groks `extern inline'.
dnl AC_C_INLINE
AC_CACHE_CHECK([for void * support], emacs_cv_void_star,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[void * foo;]])],
emacs_cv_void_star=yes, emacs_cv_void_star=no)])
......@@ -3449,16 +3446,6 @@ AH_BOTTOM([
/* Turned on June 1996 supposing nobody will mind it. */
#define AMPERSAND_FULL_NAME
/* If using GNU, then support inline function declarations. */
/* Don't try to switch on inline handling as detected by AC_C_INLINE
generally, because even if non-gcc compilers accept `inline', they
may reject `extern inline'. */
#if defined (__GNUC__)
#define INLINE __inline__
#else
#define INLINE
#endif
/* `subprocesses' should be defined if you want to
have code for asynchronous subprocesses
(as used in M-x compile and M-x shell).
......
2011-05-28 Paul Eggert <eggert@cs.ucla.edu>
Use 'inline', not 'INLINE'.
* etags.c (hash): Now inline unconditionally.
* make-docfile.c (put_char): inline, not INLINE.
2011-05-25 Glenn Morris <rgm@gnu.org>
* Makefile.in (.c.o): Remove (every .o file has an explicit rule).
......
......@@ -2360,14 +2360,7 @@ and replace lines between %< and %> with its output, then:
struct C_stab_entry { const char *name; int c_ext; enum sym_type type; };
/* maximum key range = 33, duplicates = 0 */
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
static inline unsigned int
hash (register const char *str, register unsigned int len)
{
static unsigned char asso_values[] =
......
......@@ -291,7 +291,7 @@ struct rcsoc_state
/* Output CH to the file or buffer in STATE. Any pending newlines or
spaces are output first. */
static INLINE void
static inline void
put_char (int ch, struct rcsoc_state *state)
{
int out_ch;
......
2011-05-28 Paul Eggert <eggert@cs.ucla.edu>
Use 'inline', not 'INLINE'.
* config.nt (INLINE): Remove.
2011-05-17 Eli Zaretskii <eliz@gnu.org>
* README.W32: Add information about GnuTLS libraries.
......
......@@ -362,14 +362,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* End of gnulib-related stuff. */
/* If using GNU, then support inline function declarations. */
#ifdef __GNUC__
#define INLINE __inline__
#define inline __inline__
#else
#define INLINE
#endif
#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
#define NO_INLINE __attribute__((noinline))
#else
......
2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
Use 'inline', not 'INLINE'.
<http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
* alloc.c, fontset.c (INLINE): Remove.
* alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
* intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
* xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
* gmalloc.c (register_heapinfo): Use inline unconditionally.
* lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
Make it possible to run ./temacs.
......
......@@ -22,10 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <limits.h> /* For CHAR_BIT. */
#include <setjmp.h>
#ifdef ALLOC_DEBUG
#undef INLINE
#endif
#include <signal.h>
#ifdef HAVE_GTK_AND_PTHREAD
......@@ -408,7 +404,7 @@ static void mem_rotate_left (struct mem_node *);
static void mem_rotate_right (struct mem_node *);
static void mem_delete (struct mem_node *);
static void mem_delete_fixup (struct mem_node *);
static INLINE struct mem_node *mem_find (void *);
static inline struct mem_node *mem_find (void *);
#if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS
......@@ -3374,7 +3370,7 @@ mem_init (void)
/* Value is a pointer to the mem_node containing START. Value is
MEM_NIL if there is no node in the tree containing START. */
static INLINE struct mem_node *
static inline struct mem_node *
mem_find (void *start)
{
struct mem_node *p;
......@@ -3750,7 +3746,7 @@ mem_delete_fixup (struct mem_node *x)
/* Value is non-zero if P is a pointer to a live Lisp string on
the heap. M is a pointer to the mem_block for P. */
static INLINE int
static inline int
live_string_p (struct mem_node *m, void *p)
{
if (m->type == MEM_TYPE_STRING)
......@@ -3773,7 +3769,7 @@ live_string_p (struct mem_node *m, void *p)
/* Value is non-zero if P is a pointer to a live Lisp cons on
the heap. M is a pointer to the mem_block for P. */
static INLINE int
static inline int
live_cons_p (struct mem_node *m, void *p)
{
if (m->type == MEM_TYPE_CONS)
......@@ -3799,7 +3795,7 @@ live_cons_p (struct mem_node *m, void *p)
/* Value is non-zero if P is a pointer to a live Lisp symbol on
the heap. M is a pointer to the mem_block for P. */
static INLINE int
static inline int
live_symbol_p (struct mem_node *m, void *p)
{
if (m->type == MEM_TYPE_SYMBOL)
......@@ -3825,7 +3821,7 @@ live_symbol_p (struct mem_node *m, void *p)
/* Value is non-zero if P is a pointer to a live Lisp float on
the heap. M is a pointer to the mem_block for P. */
static INLINE int
static inline int
live_float_p (struct mem_node *m, void *p)
{
if (m->type == MEM_TYPE_FLOAT)
......@@ -3849,7 +3845,7 @@ live_float_p (struct mem_node *m, void *p)
/* Value is non-zero if P is a pointer to a live Lisp Misc on
the heap. M is a pointer to the mem_block for P. */
static INLINE int
static inline int
live_misc_p (struct mem_node *m, void *p)
{
if (m->type == MEM_TYPE_MISC)
......@@ -3875,7 +3871,7 @@ live_misc_p (struct mem_node *m, void *p)
/* Value is non-zero if P is a pointer to a live vector-like object.
M is a pointer to the mem_block for P. */
static INLINE int
static inline int
live_vector_p (struct mem_node *m, void *p)
{
return (p == m->start && m->type == MEM_TYPE_VECTORLIKE);
......@@ -3885,7 +3881,7 @@ live_vector_p (struct mem_node *m, void *p)
/* Value is non-zero if P is a pointer to a live buffer. M is a
pointer to the mem_block for P. */
static INLINE int
static inline int
live_buffer_p (struct mem_node *m, void *p)
{
/* P must point to the start of the block, and the buffer
......@@ -3951,7 +3947,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "",
/* Mark OBJ if we can prove it's a Lisp_Object. */
static INLINE void
static inline void
mark_maybe_object (Lisp_Object obj)
{
void *po;
......@@ -4020,7 +4016,7 @@ mark_maybe_object (Lisp_Object obj)
/* If P points to Lisp data, mark that as live if it isn't already
marked. */
static INLINE void
static inline void
mark_maybe_pointer (void *p)
{
struct mem_node *m;
......
......@@ -137,7 +137,7 @@ bidi_initialize (void)
/* Return the bidi type of a character CH, subject to the current
directional OVERRIDE. */
static INLINE bidi_type_t
static inline bidi_type_t
bidi_get_type (int ch, bidi_dir_t override)
{
bidi_type_t default_type;
......@@ -188,7 +188,7 @@ bidi_check_type (bidi_type_t type)
}
/* Given a bidi TYPE of a character, return its category. */
static INLINE bidi_category_t
static inline bidi_category_t
bidi_get_category (bidi_type_t type)
{
switch (type)
......@@ -252,7 +252,7 @@ bidi_mirror_char (int c)
/* Copy the bidi iterator from FROM to TO. To save cycles, this only
copies the part of the level stack that is actually in use. */
static INLINE void
static inline void
bidi_copy_it (struct bidi_it *to, struct bidi_it *from)
{
int i;
......@@ -275,14 +275,14 @@ static size_t elsz = sizeof (struct bidi_it);
static int bidi_cache_idx; /* next unused cache slot */
static int bidi_cache_last_idx; /* slot of last cache hit */
static INLINE void
static inline void
bidi_cache_reset (void)
{
bidi_cache_idx = 0;
bidi_cache_last_idx = -1;
}
static INLINE void
static inline void
bidi_cache_shrink (void)
{
if (bidi_cache_size > BIDI_CACHE_CHUNK)
......@@ -294,7 +294,7 @@ bidi_cache_shrink (void)
bidi_cache_reset ();
}
static INLINE void
static inline void
bidi_cache_fetch_state (int idx, struct bidi_it *bidi_it)
{
int current_scan_dir = bidi_it->scan_dir;
......@@ -311,7 +311,7 @@ bidi_cache_fetch_state (int idx, struct bidi_it *bidi_it)
level less or equal to LEVEL. if LEVEL is -1, disregard the
resolved levels in cached states. DIR, if non-zero, means search
in that direction from the last cache hit. */
static INLINE int
static inline int
bidi_cache_search (EMACS_INT charpos, int level, int dir)
{
int i, i_start;
......@@ -402,7 +402,7 @@ bidi_cache_find_level_change (int level, int dir, int before)
return -1;
}
static INLINE void
static inline void
bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved)
{
int idx;
......@@ -460,7 +460,7 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved)
bidi_cache_idx = idx + 1;
}
static INLINE bidi_type_t
static inline bidi_type_t
bidi_cache_find (EMACS_INT charpos, int level, struct bidi_it *bidi_it)
{
int i = bidi_cache_search (charpos, level, bidi_it->scan_dir);
......@@ -480,7 +480,7 @@ bidi_cache_find (EMACS_INT charpos, int level, struct bidi_it *bidi_it)
return UNKNOWN_BT;
}
static INLINE int
static inline int
bidi_peek_at_next_level (struct bidi_it *bidi_it)
{
if (bidi_cache_idx == 0 || bidi_cache_last_idx == -1)
......@@ -519,7 +519,7 @@ bidi_at_paragraph_end (EMACS_INT charpos, EMACS_INT bytepos)
embedding levels on either side of the run boundary. Also, update
the saved info about previously seen characters, since that info is
generally valid for a single level run. */
static INLINE void
static inline void
bidi_set_sor_type (struct bidi_it *bidi_it, int level_before, int level_after)
{
int higher_level = level_before > level_after ? level_before : level_after;
......@@ -729,7 +729,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
/* Do whatever UAX#9 clause X8 says should be done at paragraph's
end. */
static INLINE void
static inline void
bidi_set_paragraph_end (struct bidi_it *bidi_it)
{
bidi_it->invalid_levels = 0;
......@@ -772,7 +772,7 @@ bidi_init_it (EMACS_INT charpos, EMACS_INT bytepos, struct bidi_it *bidi_it)
/* Push the current embedding level and override status; reset the
current level to LEVEL and the current override status to OVERRIDE. */
static INLINE void
static inline void
bidi_push_embedding_level (struct bidi_it *bidi_it,
int level, bidi_dir_t override)
{
......@@ -785,7 +785,7 @@ bidi_push_embedding_level (struct bidi_it *bidi_it,
/* Pop the embedding level and directional override status from the
stack, and return the new level. */
static INLINE int
static inline int
bidi_pop_embedding_level (struct bidi_it *bidi_it)
{
/* UAX#9 says to ignore invalid PDFs. */
......@@ -795,7 +795,7 @@ bidi_pop_embedding_level (struct bidi_it *bidi_it)
}
/* Record in SAVED_INFO the information about the current character. */
static INLINE void
static inline void
bidi_remember_char (struct bidi_saved_info *saved_info,
struct bidi_it *bidi_it)
{
......@@ -811,7 +811,7 @@ bidi_remember_char (struct bidi_saved_info *saved_info,
/* Resolve the type of a neutral character according to the type of
surrounding strong text and the current embedding level. */
static INLINE bidi_type_t
static inline bidi_type_t
bidi_resolve_neutral_1 (bidi_type_t prev_type, bidi_type_t next_type, int lev)
{
/* N1: European and Arabic numbers are treated as though they were R. */
......@@ -828,7 +828,7 @@ bidi_resolve_neutral_1 (bidi_type_t prev_type, bidi_type_t next_type, int lev)
return STRONG_R;
}
static INLINE int
static inline int
bidi_explicit_dir_char (int c)
{
/* FIXME: this should be replaced with a lookup table with suitable
......
......@@ -418,7 +418,7 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries,
/* Read a hexadecimal number (preceded by "0x") from the file FP while
paying attention to comment character '#'. */
static INLINE unsigned
static inline unsigned
read_hex (FILE *fp, int *eof)
{
int c;
......
......@@ -864,21 +864,21 @@ static void decode_eol (struct coding_system *);
static Lisp_Object get_translation_table (Lisp_Object, int, int *);
static Lisp_Object get_translation (Lisp_Object, int *, int *);
static int produce_chars (struct coding_system *, Lisp_Object, int);
static INLINE void produce_charset (struct coding_system *, int *,
static inline void produce_charset (struct coding_system *, int *,
EMACS_INT);
static void produce_annotation (struct coding_system *, EMACS_INT);
static int decode_coding (struct coding_system *);
static INLINE int *handle_composition_annotation (EMACS_INT, EMACS_INT,
static inline int *handle_composition_annotation (EMACS_INT, EMACS_INT,
struct coding_system *,
int *, EMACS_INT *);
static INLINE int *handle_charset_annotation (EMACS_INT, EMACS_INT,
static inline int *handle_charset_annotation (EMACS_INT, EMACS_INT,
struct coding_system *,
int *, EMACS_INT *);
static void consume_chars (struct coding_system *, Lisp_Object, int);
static int encode_coding (struct coding_system *);
static Lisp_Object make_conversion_work_buffer (int);
static Lisp_Object code_conversion_restore (Lisp_Object);
static INLINE int char_encodable_p (int, Lisp_Object);
static inline int char_encodable_p (int, Lisp_Object);
static Lisp_Object make_subsidiaries (Lisp_Object);
static void
......@@ -6829,7 +6829,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
[ -LENGTH ANNOTATION_MASK NCHARS NBYTES METHOD [ COMPONENTS... ] ]
*/
static INLINE void
static inline void
produce_composition (struct coding_system *coding, int *charbuf, EMACS_INT pos)
{
int len;
......@@ -6873,7 +6873,7 @@ produce_composition (struct coding_system *coding, int *charbuf, EMACS_INT pos)
[ -LENGTH ANNOTATION_MASK NCHARS CHARSET-ID ]
*/
static INLINE void
static inline void
produce_charset (struct coding_system *coding, int *charbuf, EMACS_INT pos)
{
EMACS_INT from = pos - charbuf[2];
......@@ -7101,7 +7101,7 @@ decode_coding (struct coding_system *coding)
position of a composition after POS (if any) or to LIMIT, and
return BUF. */
static INLINE int *
static inline int *
handle_composition_annotation (EMACS_INT pos, EMACS_INT limit,
struct coding_system *coding, int *buf,
EMACS_INT *stop)
......@@ -7184,7 +7184,7 @@ handle_composition_annotation (EMACS_INT pos, EMACS_INT limit,
If the property value is nil, set *STOP to the position where the
property value is non-nil (limiting by LIMIT), and return BUF. */
static INLINE int *
static inline int *
handle_charset_annotation (EMACS_INT pos, EMACS_INT limit,
struct coding_system *coding, int *buf,
EMACS_INT *stop)
......@@ -8435,7 +8435,7 @@ highest priority. */)
}
static INLINE int
static inline int
char_encodable_p (int c, Lisp_Object attrs)
{
Lisp_Object tail;
......
......@@ -1101,7 +1101,7 @@ swap_glyphs_in_rows (a, b)
/* Exchange pointers to glyph memory between glyph rows A and B. */
static INLINE void
static inline void
swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
{
int i;
......@@ -1117,7 +1117,7 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
/* Copy glyph row structure FROM to glyph row structure TO, except
that glyph pointers in the structures are left unchanged. */
static INLINE void
static inline void
copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
{
struct glyph *pointers[1 + LAST_AREA];
......@@ -1138,7 +1138,7 @@ copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
exchanged between TO and FROM. Pointers must be exchanged to avoid
a memory leak. */
static INLINE void
static inline void
assign_row (struct glyph_row *to, struct glyph_row *from)
{
swap_glyph_pointers (to, from);
......@@ -1304,7 +1304,7 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos)
and B have equal contents. MOUSE_FACE_P non-zero means compare the
mouse_face_p flags of A and B, too. */
static INLINE int
static inline int
row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p)
{
if (a == b)
......@@ -2729,7 +2729,7 @@ fill_up_frame_row_with_spaces (struct glyph_row *row, int upto)
function must be called before updates to make explicit that we are
working on frame matrices or not. */
static INLINE void
static inline void
set_frame_matrix_frame (struct frame *f)
{
frame_matrix_frame = f;
......@@ -2744,7 +2744,7 @@ set_frame_matrix_frame (struct frame *f)
done in frame matrices, and that we have to perform analogous
operations in window matrices of frame_matrix_frame. */
static INLINE void
static inline void
make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_matrix, int row)
{
struct glyph_row *current_row = MATRIX_ROW (current_matrix, row);
......@@ -4246,7 +4246,7 @@ static struct run **runs;
/* Add glyph row ROW to the scrolling hash table. */
static INLINE struct row_entry *
static inline struct row_entry *
add_row_entry (struct glyph_row *row)
{
struct row_entry *entry;
......
......@@ -3704,7 +3704,7 @@ copy_hash_table (struct Lisp_Hash_Table *h1)
/* Resize hash table H if it's too full. If H cannot be resized
because it's already too large, throw an error. */
static INLINE void
static inline void
maybe_resize_hash_table (struct Lisp_Hash_Table *h)
{
if (NILP (h->next_free))
......
......@@ -58,8 +58,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef xassert
#ifdef FONTSET_DEBUG
#define xassert(X) do {if (!(X)) abort ();} while (0)
#undef INLINE
#define INLINE
#else /* not FONTSET_DEBUG */
#define xassert(X) (void) 0
#endif /* not FONTSET_DEBUG */
......
......@@ -552,12 +552,8 @@ get_contiguous_space (size, position)
/* This is called when `_heapinfo' and `heapsize' have just
been set to describe a new info table. Set up the table
to describe itself and account for it in the statistics. */
static void register_heapinfo PP ((void));
#ifdef __GNUC__
__inline__
#endif
static void
register_heapinfo ()
static inline void
register_heapinfo (void)
{
__malloc_size_t block, blocks;
......@@ -2170,4 +2166,3 @@ mprobe (__ptr_t ptr)
}
#endif /* GC_MCHECK */
......@@ -623,7 +623,7 @@ define_image_type (struct image_type *type, int loaded)
/* Look up image type SYMBOL, and return a pointer to its image_type
structure. Value is null if SYMBOL is not a known image type. */
static INLINE struct image_type *
static inline struct image_type *
lookup_image_type (Lisp_Object symbol)
{
struct image_type *type;
......
......@@ -313,7 +313,7 @@ root_interval (interval)
c c
*/
static INLINE INTERVAL
static inline INTERVAL
rotate_right (INTERVAL interval)
{
INTERVAL i;
......@@ -360,7 +360,7 @@ rotate_right (INTERVAL interval)
c c
*/
static INLINE INTERVAL
static inline INTERVAL
rotate_left (INTERVAL interval)
{
INTERVAL i;
......@@ -438,7 +438,7 @@ balance_an_interval (INTERVAL i)
/* Balance INTERVAL, potentially stuffing it back into its parent
Lisp Object. */
static INLINE INTERVAL
static inline INTERVAL
balance_possible_root_interval (register INTERVAL interval)
{
Lisp_Object parent;
......@@ -1427,7 +1427,7 @@ adjust_intervals_for_deletion (struct buffer *buffer,
at position START. Addition or deletion is indicated by the sign
of LENGTH. */
INLINE void
inline void
offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
{
if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0)
......@@ -1883,7 +1883,7 @@ lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop
/* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to
byte position BYTEPOS. */
INLINE void
inline void
temp_set_point_both (struct buffer *buffer,
EMACS_INT charpos, EMACS_INT bytepos)
{
......@@ -1903,7 +1903,7 @@ temp_set_point_both (struct buffer *buffer,
/* Set point "temporarily", without checking any text properties. */
INLINE void
inline void
temp_set_point (struct buffer *buffer, EMACS_INT charpos)
{
temp_set_point_both (buffer, charpos,
......@@ -2392,7 +2392,7 @@ copy_intervals (INTERVAL tree, EMACS_INT start, EMACS_INT length)
/* Give STRING the properties of BUFFER from POSITION to LENGTH. */
INLINE void
inline void
copy_intervals_to_string (Lisp_Object string, struct buffer *buffer,
EMACS_INT position, EMACS_INT length)
{
......
......@@ -3742,7 +3742,7 @@ kbd_buffer_events_waiting (int discard)
/* Clear input event EVENT. */
static INLINE void
static inline void
clear_event (struct input_event *event)
{
event->kind = NO_EVENT;
......
......@@ -317,7 +317,7 @@ Lisp_Object;
#endif /* WORDS_BIGENDIAN */
#ifdef __GNUC__
static __inline__ Lisp_Object
static inline Lisp_Object
LISP_MAKE_RVALUE (Lisp_Object o)
{
return o;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment