mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
macros: add G_GNUC_NO_INLINE function attribute
https://bugzilla.gnome.org/show_bug.cgi?id=795180
This commit is contained in:
parent
2fd0627326
commit
ede5c3f8d9
@ -445,6 +445,7 @@ G_GNUC_NULL_TERMINATED
|
||||
G_GNUC_WARN_UNUSED_RESULT
|
||||
G_GNUC_FUNCTION
|
||||
G_GNUC_PRETTY_FUNCTION
|
||||
G_GNUC_NO_INLINE
|
||||
G_GNUC_NO_INSTRUMENT
|
||||
G_HAVE_GNUC_VISIBILITY
|
||||
G_GNUC_INTERNAL
|
||||
|
19
glib/docs.c
19
glib/docs.c
@ -2048,6 +2048,25 @@
|
||||
* See the GNU C documentation for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_GNUC_NO_INLINE:
|
||||
*
|
||||
* Expands to the GNU C `noinline` function attribute if the compiler is gcc.
|
||||
* If the compiler is not gcc, this macro expands to nothing.
|
||||
*
|
||||
* Declaring a function as `noinline` prevents the function from being
|
||||
* considered for inlining.
|
||||
*
|
||||
* The attribute may be placed before the declaration, right before the
|
||||
* `static` keyword.
|
||||
*
|
||||
* See the
|
||||
* [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noinline-function-attribute)
|
||||
* for more details.
|
||||
*
|
||||
* Since: 2.58
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_GNUC_MALLOC:
|
||||
*
|
||||
|
@ -97,9 +97,11 @@
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
#define G_GNUC_PURE __attribute__((__pure__))
|
||||
#define G_GNUC_MALLOC __attribute__((__malloc__))
|
||||
#define G_GNUC_NO_INLINE __attribute__((noinline))
|
||||
#else
|
||||
#define G_GNUC_PURE
|
||||
#define G_GNUC_MALLOC
|
||||
#define G_GNUC_NO_INLINE
|
||||
#endif
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
|
Loading…
Reference in New Issue
Block a user