1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 specialised macros which are not used often.
7 <!-- ##### SECTION Long_Description ##### -->
9 These macros provide more specialized features which are not needed so often
10 by application programmers.
13 <!-- ##### SECTION See_Also ##### -->
18 <!-- ##### MACRO G_INLINE_FUNC ##### -->
20 Used to declare inline functions. If inline functions are not supported on
21 the particular platform, the macro evaluates to the empty string.
26 <!-- ##### MACRO G_STMT_START ##### -->
28 Used within multi-statement macros so that they can be used in places where
29 only one statement is expected by the compiler.
34 <!-- ##### MACRO G_STMT_END ##### -->
36 Used within multi-statement macros so that they can be used in places where
37 only one statement is expected by the compiler.
42 <!-- ##### MACRO G_BEGIN_DECLS ##### -->
49 <!-- ##### MACRO G_END_DECLS ##### -->
56 <!-- ##### MACRO G_N_ELEMENTS ##### -->
64 <!-- ##### MACRO G_VA_COPY ##### -->
66 Portable way to copy <type>va_list</type> variables.
69 <!-- # Unused Parameters # -->
70 @ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
71 @ap2: a <type>va_list</type>.
74 <!-- ##### MACRO G_STRINGIFY ##### -->
82 <!-- ##### MACRO G_GNUC_EXTENSION ##### -->
84 Expands to "__extension__" when GNU C is used as the compiler.
85 This simply tells GNU C not to warn about the following non-standard code
86 when compiling with the -pedantic option.
91 <!-- ##### MACRO G_GNUC_CONST ##### -->
93 Expands to the GNU C const function attribute if the compiler is GNU C.
94 This enables optimization of the function.
95 See the GNU C documentation for details.
100 <!-- ##### MACRO G_GNUC_NORETURN ##### -->
102 Expands to the GNU C noreturn function attribute if the compiler is GNU C.
103 It is used for declaring functions which never return.
104 It enables optimization of the function, and avoids possible compiler
105 warnings. See the GNU C documentation for details.
110 <!-- ##### MACRO G_GNUC_UNUSED ##### -->
112 Expands to the GNU C unused function attribute if the compiler is GNU C.
113 It is used for declaring functions which may never be used.
114 It avoids possible compiler warnings. See the GNU C documentation for details.
119 <!-- ##### MACRO G_GNUC_PURE ##### -->
126 <!-- ##### MACRO G_GNUC_PRINTF ##### -->
128 Expands to the GNU C format function attribute if the compiler is GNU C.
129 This is used for declaring functions which take a variable number of
130 arguments, with the same syntax as <function>printf()</function>.
131 It allows the compiler to type-check the arguments passed to the function.
132 See the GNU C documentation for details.
135 @format_idx: the index of the argument corresponding to the format string.
136 (The arguments are numbered from 1).
137 @arg_idx: the index of the first of the format arguments.
140 <!-- ##### MACRO G_GNUC_SCANF ##### -->
142 Expands to the GNU C format function attribute if the compiler is GNU C.
143 This is used for declaring functions which take a variable number of
144 arguments, with the same syntax as <function>scanf()</function>.
145 It allows the compiler to type-check the arguments passed to the function.
146 See the GNU C documentation for details.
149 @format_idx: the index of the argument corresponding to the format string.
150 (The arguments are numbered from 1).
151 @arg_idx: the index of the first of the format arguments.
154 <!-- ##### MACRO G_GNUC_FORMAT ##### -->
156 Expands to the GNU C format_arg function attribute if the compiler is GNU C.
157 This is used for declaring functions which take a variable number of
158 parameters, like <function>printf()</function> and
159 <function>scanf()</function>. See the GNU C documentation for details.
161 FIXME: I can't find this in my GNU C documentation. Take out?
164 @arg_idx: the index of the argument.
167 <!-- ##### MACRO G_GNUC_FUNCTION ##### -->
169 Expands to the GNU C __FUNCTION__ variable if the compiler is GNU C,
171 The GNU C __FUNCTION__ variable contains the name of the current function.
172 See the GNU C documentation for details.
177 <!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
179 Expands to the GNU C __PRETTY_FUNCTION__ variable if the compiler is GNU C,
181 The GNU C __PRETTY_FUNCTION__ variable contains the name of the current
182 function. For a C program this is the same as the __FUNCTION__ variable
183 but for C++ it also includes extra information such as the class
184 and function prototype. See the GNU C documentation for details.
189 <!-- ##### MACRO G_STRLOC ##### -->
196 <!-- ##### MACRO G_GINT16_FORMAT ##### -->
198 This is the platform dependent conversion specifier for scanning and
199 printing values of type #gint16. It is a string literal, but doesn't
200 include the percent-sign, such that you can add precision and length
201 modifiers between percent-sign and conversion specifier.
209 sscanf ("42", "%" G_GINT16_FORMAT, &in)
211 g_print ("%" G_GINT32_FORMAT, out);
218 <!-- ##### MACRO G_GUINT16_FORMAT ##### -->
220 This is the platform dependent conversion specifier for scanning and
221 printing values of type #guint16. See also #G_GINT16_FORMAT.
226 <!-- ##### MACRO G_GINT32_FORMAT ##### -->
228 This is the platform dependent conversion specifier for scanning and
229 printing values of type #gint32. See also #G_GINT16_FORMAT.
234 <!-- ##### MACRO G_GUINT32_FORMAT ##### -->
236 This is the platform dependent conversion specifier for scanning and
237 printing values of type #guint32. See also #G_GINT16_FORMAT.
242 <!-- ##### MACRO G_GINT64_FORMAT ##### -->
244 This is the platform dependent conversion specifier for scanning and
245 printing values of type #gint64. See also #G_GINT16_FORMAT.
250 Some platforms do not support scanning and printing 64 bit integers,
251 even though the types are supported. On such platforms G_GINT64_FORMAT
258 <!-- ##### MACRO G_GUINT64_FORMAT ##### -->
260 This is the platform dependent conversion specifier for scanning and
261 printing values of type #guint64. See also #G_GINT16_FORMAT.
266 Some platforms do not support scanning and printing 64 bit integers,
267 even though the types are supported. On such platforms G_GUINT64_FORMAT