Miscellaneous Macros

Miscellaneous Macros

Synopsis


#include <glib.h>

#define             G_INLINE_FUNC

#define             G_STMT_START
#define             G_STMT_END

#define             G_BEGIN_DECLS
#define             G_END_DECLS

#define             G_N_ELEMENTS                        (arr)

#define             G_VA_COPY                           (ap1,ap2)

#define             G_STRINGIFY                         (macro_or_string)
#define             G_PASTE                             (identifier1,identifier2)
#define             G_STATIC_ASSERT                     (expr)

#define             G_GNUC_EXTENSION
#define             G_GNUC_CONST
#define             G_GNUC_PURE
#define             G_GNUC_MALLOC
#define             G_GNUC_ALLOC_SIZE                   (x)
#define             G_GNUC_ALLOC_SIZE2                  (x,y)
#define             G_GNUC_DEPRECATED
#define             G_GNUC_DEPRECATED_FOR               (f)
#define             G_GNUC_NORETURN
#define             G_GNUC_UNUSED
#define             G_GNUC_PRINTF                       ( format_idx, arg_idx )
#define             G_GNUC_SCANF                        ( format_idx, arg_idx )
#define             G_GNUC_FORMAT                       ( arg_idx )
#define             G_GNUC_NULL_TERMINATED
#define             G_GNUC_WARN_UNUSED_RESULT
#define             G_GNUC_FUNCTION
#define             G_GNUC_PRETTY_FUNCTION
#define             G_GNUC_NO_INSTRUMENT
#define             G_HAVE_GNUC_VISIBILITY
#define             G_GNUC_INTERNAL
#define             G_GNUC_MAY_ALIAS

return              G_LIKELY                            ();
#define             G_UNLIKELY                          (expr)

#define             G_STRLOC
#define             G_STRFUNC

#define             G_GINT16_MODIFIER
#define             G_GINT16_FORMAT
#define             G_GUINT16_FORMAT
#define             G_GINT32_MODIFIER
#define             G_GINT32_FORMAT
#define             G_GUINT32_FORMAT
#define             G_GINT64_MODIFIER
#define             G_GINT64_FORMAT
#define             G_GUINT64_FORMAT
#define             G_GSIZE_MODIFIER
#define             G_GSIZE_FORMAT
#define             G_GSSIZE_FORMAT
#define             G_GOFFSET_MODIFIER
#define             G_GOFFSET_FORMAT
#define             G_GINTPTR_MODIFIER
#define             G_GINTPTR_FORMAT
#define             G_GUINTPTR_FORMAT

Description

Details

G_INLINE_FUNC

#define             G_INLINE_FUNC


G_STMT_START

#  define G_STMT_START  do


G_STMT_END

#  define G_STMT_END    while (0)


G_BEGIN_DECLS

#define             G_BEGIN_DECLS


G_END_DECLS

#define             G_END_DECLS


G_N_ELEMENTS()

#define G_N_ELEMENTS(arr)		(sizeof (arr) / sizeof ((arr)[0]))

arr :


G_VA_COPY()

#define             G_VA_COPY(ap1,ap2)

ap1 :

ap2 :


G_STRINGIFY()

#define G_STRINGIFY(macro_or_string)	G_STRINGIFY_ARG (macro_or_string)

macro_or_string :


G_PASTE()

#define G_PASTE(identifier1,identifier2)      G_PASTE_ARGS (identifier1, identifier2)

identifier1 :

identifier2 :


G_STATIC_ASSERT()

#define G_STATIC_ASSERT(expr) typedef struct { char Compile_Time_Assertion[(expr) ? 1 : -1]; } G_PASTE (_GStaticAssert_, __LINE__)

expr :


G_GNUC_EXTENSION

#define             G_GNUC_EXTENSION


G_GNUC_CONST

#define             G_GNUC_CONST


G_GNUC_PURE

#define             G_GNUC_PURE


G_GNUC_MALLOC

#define             G_GNUC_MALLOC


G_GNUC_ALLOC_SIZE()

#define             G_GNUC_ALLOC_SIZE(x)

x :


G_GNUC_ALLOC_SIZE2()

#define             G_GNUC_ALLOC_SIZE2(x,y)

x :

y :


G_GNUC_DEPRECATED

#define             G_GNUC_DEPRECATED


G_GNUC_DEPRECATED_FOR()

#define             G_GNUC_DEPRECATED_FOR(f)

f :


G_GNUC_NORETURN

#define             G_GNUC_NORETURN


G_GNUC_UNUSED

#define             G_GNUC_UNUSED


G_GNUC_PRINTF()

#define             G_GNUC_PRINTF( format_idx, arg_idx )

format_idx :

arg_idx :


G_GNUC_SCANF()

#define             G_GNUC_SCANF( format_idx, arg_idx )

format_idx :

arg_idx :


G_GNUC_FORMAT()

#define             G_GNUC_FORMAT( arg_idx )

arg_idx :


G_GNUC_NULL_TERMINATED

#define             G_GNUC_NULL_TERMINATED


G_GNUC_WARN_UNUSED_RESULT

#define             G_GNUC_WARN_UNUSED_RESULT


G_GNUC_FUNCTION

#define             G_GNUC_FUNCTION

Warning

G_GNUC_FUNCTION is deprecated and should not be used in newly-written code.


G_GNUC_PRETTY_FUNCTION

#define             G_GNUC_PRETTY_FUNCTION

Warning

G_GNUC_PRETTY_FUNCTION is deprecated and should not be used in newly-written code.


G_GNUC_NO_INSTRUMENT

#define             G_GNUC_NO_INSTRUMENT


G_HAVE_GNUC_VISIBILITY

#define G_HAVE_GNUC_VISIBILITY 1


G_GNUC_INTERNAL

#define             G_GNUC_INTERNAL


G_GNUC_MAY_ALIAS

#define             G_GNUC_MAY_ALIAS


G_LIKELY ()

return              G_LIKELY                            ();

Returns :


G_UNLIKELY()

#define             G_UNLIKELY(expr)

expr :


G_STRLOC

#define             G_STRLOC


G_STRFUNC

#define             G_STRFUNC


G_GINT16_MODIFIER

#define G_GINT16_MODIFIER "h"


G_GINT16_FORMAT

#define G_GINT16_FORMAT "hi"


G_GUINT16_FORMAT

#define G_GUINT16_FORMAT "hu"


G_GINT32_MODIFIER

#define G_GINT32_MODIFIER ""


G_GINT32_FORMAT

#define G_GINT32_FORMAT "i"


G_GUINT32_FORMAT

#define G_GUINT32_FORMAT "u"


G_GINT64_MODIFIER

#define G_GINT64_MODIFIER "l"


G_GINT64_FORMAT

#define G_GINT64_FORMAT "li"


G_GUINT64_FORMAT

#define G_GUINT64_FORMAT "lu"


G_GSIZE_MODIFIER

#define G_GSIZE_MODIFIER "l"


G_GSIZE_FORMAT

#define G_GSIZE_FORMAT "lu"


G_GSSIZE_FORMAT

#define G_GSSIZE_FORMAT "li"


G_GOFFSET_MODIFIER

#define G_GOFFSET_MODIFIER      G_GINT64_MODIFIER


G_GOFFSET_FORMAT

#define G_GOFFSET_FORMAT        G_GINT64_FORMAT


G_GINTPTR_MODIFIER

#define G_GINTPTR_MODIFIER      "l"


G_GINTPTR_FORMAT

#define G_GINTPTR_FORMAT        "li"


G_GUINTPTR_FORMAT

#define G_GUINTPTR_FORMAT       "lu"