[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113054: * conf_post.h: Add comments for INLINE, EXT
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r113054: * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc. |
Date: |
Tue, 18 Jun 2013 18:36:17 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113054
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2013-06-18 11:36:13 -0700
message:
* conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/conf_post.h conf_post.h-20120730211826-q0qbxxwh2emw52hd-1
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-06-18 14:54:48 +0000
+++ b/src/ChangeLog 2013-06-18 18:36:13 +0000
@@ -1,3 +1,7 @@
+2013-06-18 Paul Eggert <address@hidden>
+
+ * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
+
2013-06-18 Kenichi Handa <address@hidden>
* font.c (Ffont_spec): Signal an error for an invalid font name
=== modified file 'src/conf_post.h'
--- a/src/conf_post.h 2013-03-13 18:42:22 +0000
+++ b/src/conf_post.h 2013-06-18 18:36:13 +0000
@@ -207,6 +207,37 @@
#undef noinline
#endif
+/* Use Gnulib's extern-inline module for extern inline functions.
+ An include file foo.h should prepend FOO_INLINE to function
+ definitions, with the following overall pattern:
+
+ [#include any other .h files first.]
+ ...
+ INLINE_HEADER_BEGIN
+ #ifndef FOO_INLINE
+ # define FOO_INLINE INLINE
+ #endif
+ ...
+ FOO_INLINE int
+ incr (int i)
+ {
+ return i + 1;
+ }
+ ...
+ INLINE_HEADER_END
+
+ The corresponding foo.c file should do this:
+
+ #define FOO_INLINE EXTERN_INLINE
+
+ before including any .h file other than config.h.
+ Other .c files should not define FOO_INILNE.
+
+ C99 compilers compile functions like 'incr' as C99-style extern
+ inline functions. Pre-C99 GCCs do something similar with
+ GNU-specific keywords. Pre-C99 non-GCC compilers use static
+ functions, which bloats the code but is good enough. */
+
#define INLINE _GL_INLINE
#define EXTERN_INLINE _GL_EXTERN_INLINE
#define INLINE_HEADER_BEGIN _GL_INLINE_HEADER_BEGIN
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113054: * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.,
Paul Eggert <=