1999-08-16 17:58:30 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
Miscellaneous Macros
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2001-09-29 00:21:16 +00:00
|
|
|
specialized macros which are not used often.
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2000-09-07 16:36:56 +00:00
|
|
|
These macros provide more specialized features which are not needed so often
|
|
|
|
by application programmers.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2005-05-05 14:57:29 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 17:58:30 +00:00
|
|
|
<!-- ##### MACRO G_INLINE_FUNC ##### -->
|
|
|
|
<para>
|
2005-07-20 15:41:19 +00:00
|
|
|
This macro is used to export function prototypes so they can be linked
|
|
|
|
with an external version when no inlining is performed. The file which
|
|
|
|
implements the functions should define %G_IMPLEMENTS_INLINES
|
|
|
|
before including the headers which contain %G_INLINE_FUNC declarations.
|
|
|
|
Since inlining is very compiler-dependent using these macros correctly
|
|
|
|
is very difficult. Their use is strongly discouraged.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This macro is often mistaken for a replacement for the inline keyword;
|
|
|
|
inline is already declared in a portable manner in the glib headers
|
|
|
|
and can be used normally.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2005-07-22 17:02:04 +00:00
|
|
|
|
1999-08-16 17:58:30 +00:00
|
|
|
<!-- ##### MACRO G_STMT_START ##### -->
|
|
|
|
<para>
|
2000-09-07 16:36:56 +00:00
|
|
|
Used within multi-statement macros so that they can be used in places where
|
|
|
|
only one statement is expected by the compiler.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_STMT_END ##### -->
|
|
|
|
<para>
|
2000-09-07 16:36:56 +00:00
|
|
|
Used within multi-statement macros so that they can be used in places where
|
|
|
|
only one statement is expected by the compiler.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 20:36:35 +00:00
|
|
|
<!-- ##### MACRO G_BEGIN_DECLS ##### -->
|
|
|
|
<para>
|
2001-05-19 05:32:50 +00:00
|
|
|
Used (along with #G_END_DECLS) to bracket header files. If the
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
compiler in use is a C++ compiler, adds <literal>extern "C"</literal>
|
|
|
|
around the header.
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 20:36:35 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_END_DECLS ##### -->
|
|
|
|
<para>
|
2001-05-19 05:32:50 +00:00
|
|
|
Used (along with #G_BEGIN_DECLS) to bracket header files. If the
|
2001-09-29 00:21:16 +00:00
|
|
|
compiler in use is a C++ compiler, adds <literal>extern "C"</literal>
|
|
|
|
around the header.
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 20:36:35 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-06 00:04:49 +00:00
|
|
|
<!-- ##### MACRO G_N_ELEMENTS ##### -->
|
|
|
|
<para>
|
2001-05-19 05:32:50 +00:00
|
|
|
Determines the number of elements in an array. The array must be
|
|
|
|
declared so the compiler knows its size at compile-time; this
|
|
|
|
macro will not work on an array allocated on the heap, only static
|
|
|
|
arrays or arrays on the stack.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
2001-05-19 05:32:50 +00:00
|
|
|
@arr: the array
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_VA_COPY ##### -->
|
|
|
|
<para>
|
2000-09-07 16:36:56 +00:00
|
|
|
Portable way to copy <type>va_list</type> variables.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
2001-06-28 21:45:02 +00:00
|
|
|
<para>
|
2001-09-29 00:21:16 +00:00
|
|
|
In order to use this function, you must include <filename>string.h</filename>
|
|
|
|
yourself, because this macro may use <function>memmove()</function> and GLib
|
|
|
|
does not include <function>string.h</function> for you.
|
2001-06-28 21:45:02 +00:00
|
|
|
</para>
|
2000-09-06 00:04:49 +00:00
|
|
|
|
2000-09-07 16:36:56 +00:00
|
|
|
@ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
|
|
|
|
@ap2: a <type>va_list</type>.
|
2000-09-06 00:04:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_STRINGIFY ##### -->
|
|
|
|
<para>
|
2001-09-29 00:21:16 +00:00
|
|
|
Accepts a macro or a string and converts it into a string.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
2001-09-29 00:21:16 +00:00
|
|
|
@macro_or_string: a macro or a string.
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_EXTENSION ##### -->
|
|
|
|
<para>
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
Expands to <literal>__extension__</literal> when <command>gcc</command> is
|
|
|
|
used as the compiler.
|
|
|
|
This simply tells <command>gcc</command> not to warn about the following non-standard code
|
|
|
|
when compiling with the <option>-pedantic</option> option.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-10-06 09:25:09 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_CONST ##### -->
|
|
|
|
<para>
|
2004-11-28 19:13:36 +00:00
|
|
|
Expands to the GNU C <literal>const</literal> function attribute if the compiler is
|
|
|
|
<command>gcc</command>. Declaring a function as const enables better optimization of calls
|
|
|
|
to the function. A const function doesn't examine any values except its parameters, and has no
|
|
|
|
effects except its return value. See the GNU C documentation for details.
|
2001-10-06 09:25:09 +00:00
|
|
|
</para>
|
|
|
|
<note><para>
|
|
|
|
A function that has pointer arguments and examines the data pointed to
|
|
|
|
must <emphasis>not</emphasis> be declared const. Likewise, a function that
|
|
|
|
calls a non-const function usually must not be const. It doesn't make sense
|
|
|
|
for a const function to return void.
|
|
|
|
</para></note>
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-11-28 19:13:36 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_PURE ##### -->
|
|
|
|
<para>
|
|
|
|
Expands to the GNU C <literal>pure</literal> function attribute if the compiler is
|
|
|
|
<command>gcc</command>. Declaring a function as pure enables better optimization of
|
|
|
|
calls to the function. A pure function has no effects except its return value and the
|
|
|
|
return value depends only on the parameters and/or global variables.
|
|
|
|
See the GNU C documentation for details.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_MALLOC ##### -->
|
|
|
|
<para>
|
|
|
|
Expands to the GNU C <literal>malloc</literal> function attribute if the compiler is
|
|
|
|
<command>gcc</command>. Declaring a function as malloc enables better optimization of the
|
|
|
|
function. A function can have the malloc attribute if it returns a pointer which is guaranteed
|
|
|
|
to not alias with any other pointer when the function returns (in practice, this means newly
|
|
|
|
allocated memory).
|
|
|
|
See the GNU C documentation for details.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Since: 2.6
|
|
|
|
|
|
|
|
|
2003-06-16 23:01:00 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_DEPRECATED ##### -->
|
|
|
|
<para>
|
|
|
|
Expands to the GNU C <literal>deprecated</literal> attribute if the compiler
|
|
|
|
is <command>gcc</command>.
|
|
|
|
It can be used to mark typedefs, variables and functions as deprecated.
|
|
|
|
When called with the <option>-Wdeprecated</option> option, the compiler will
|
|
|
|
generate warnings when deprecated interfaces are used.
|
|
|
|
See the GNU C documentation for details.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Since: 2.2
|
|
|
|
|
|
|
|
|
1999-08-16 17:58:30 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_NORETURN ##### -->
|
|
|
|
<para>
|
2003-06-16 23:01:00 +00:00
|
|
|
Expands to the GNU C <literal>noreturn</literal> function attribute if the
|
2004-11-28 19:13:36 +00:00
|
|
|
compiler is <command>gcc</command>. It is used for declaring functions which never return.
|
2000-09-07 16:36:56 +00:00
|
|
|
It enables optimization of the function, and avoids possible compiler
|
|
|
|
warnings. See the GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_UNUSED ##### -->
|
|
|
|
<para>
|
2004-11-28 19:13:36 +00:00
|
|
|
Expands to the GNU C <literal>unused</literal> function attribute if the compiler is
|
|
|
|
<command>gcc</command>. It is used for declaring functions which may never be used.
|
2000-09-07 16:36:56 +00:00
|
|
|
It avoids possible compiler warnings. See the GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_PRINTF ##### -->
|
|
|
|
<para>
|
2004-11-28 19:13:36 +00:00
|
|
|
Expands to the GNU C <literal>format</literal> function attribute if the compiler is
|
|
|
|
<command>gcc</command>. This is used for declaring functions which take a variable number of
|
2000-09-07 16:36:56 +00:00
|
|
|
arguments, with the same syntax as <function>printf()</function>.
|
|
|
|
It allows the compiler to type-check the arguments passed to the function.
|
|
|
|
See the GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
2001-10-02 23:09:51 +00:00
|
|
|
<informalexample><programlisting>
|
|
|
|
gint g_snprintf (gchar *string,
|
|
|
|
gulong n,
|
|
|
|
gchar const *format,
|
|
|
|
...) G_GNUC_PRINTF (3, 4);
|
|
|
|
</programlisting></informalexample>
|
1999-08-16 17:58:30 +00:00
|
|
|
|
2000-09-07 16:36:56 +00:00
|
|
|
@format_idx: the index of the argument corresponding to the format string.
|
|
|
|
(The arguments are numbered from 1).
|
|
|
|
@arg_idx: the index of the first of the format arguments.
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_SCANF ##### -->
|
|
|
|
<para>
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
Expands to the GNU C <literal>format</literal> function attribute if the compiler is <command>gcc</command>.
|
2000-09-07 16:36:56 +00:00
|
|
|
This is used for declaring functions which take a variable number of
|
|
|
|
arguments, with the same syntax as <function>scanf()</function>.
|
|
|
|
It allows the compiler to type-check the arguments passed to the function.
|
|
|
|
See the GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
2000-09-07 16:36:56 +00:00
|
|
|
@format_idx: the index of the argument corresponding to the format string.
|
|
|
|
(The arguments are numbered from 1).
|
|
|
|
@arg_idx: the index of the first of the format arguments.
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_FORMAT ##### -->
|
|
|
|
<para>
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
Expands to the GNU C <literal>format_arg</literal> function attribute if the compiler is <command>gcc</command>.
|
|
|
|
This function attribute specifies that a function takes a format
|
2001-10-02 23:09:51 +00:00
|
|
|
string for a <function>printf()</function>, <function>scanf()</function>,
|
|
|
|
<function>strftime()</function> or <function>strfmon()</function> style
|
|
|
|
function and modifies it, so that the result can be passed to a
|
|
|
|
<function>printf()</function>, <function>scanf()</function>,
|
|
|
|
<function>strftime()</function> or <function>strfmon()</function> style
|
|
|
|
function (with the remaining arguments to the format function the same as
|
|
|
|
they would have been for the unmodified string).
|
|
|
|
See the GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
2001-10-02 23:09:51 +00:00
|
|
|
<informalexample><programlisting>
|
|
|
|
gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
|
|
|
|
</programlisting></informalexample>
|
1999-08-16 17:58:30 +00:00
|
|
|
|
2000-09-07 16:36:56 +00:00
|
|
|
@arg_idx: the index of the argument.
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
|
2005-03-08 05:41:45 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_NULL_TERMINATED ##### -->
|
|
|
|
<para>
|
|
|
|
Expands to the GNU C <literal>sentinel</literal> function attribute if the
|
|
|
|
compiler is <command>gcc</command>, or "" if it isn't. This function attribute
|
|
|
|
only applies to variadic functions and instructs the compiler to check that
|
|
|
|
the argument list is terminated with an explicit %NULL.
|
|
|
|
See the GNU C documentation for details.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
Since: 2.8
|
|
|
|
|
2005-05-05 14:57:29 +00:00
|
|
|
|
|
|
|
|
1999-08-16 17:58:30 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_FUNCTION ##### -->
|
|
|
|
<para>
|
2001-09-29 00:21:16 +00:00
|
|
|
Expands to the GNU C <literal>__FUNCTION__</literal> variable if the
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
compiler is <command>gcc</command>, or "" if it isn't. The GNU C
|
2001-09-29 00:21:16 +00:00
|
|
|
<literal>__FUNCTION__</literal> variable contains the name of the
|
|
|
|
current function. See the GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
|
|
|
|
<para>
|
2001-09-29 00:21:16 +00:00
|
|
|
Expands to the GNU C <literal>__PRETTY_FUNCTION__</literal> variable
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
if the compiler is <command>gcc</command>, or "" if it isn't.
|
2001-09-29 00:21:16 +00:00
|
|
|
The GNU C <literal>__PRETTY_FUNCTION__</literal> variable contains the
|
|
|
|
name of the current function. For a C program this is the same as the
|
|
|
|
<literal>__FUNCTION__</literal> variable but for C++ it also includes
|
|
|
|
extra information such as the class and function prototype. See the
|
|
|
|
GNU C documentation for details.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-09-10 15:50:02 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_NO_INSTRUMENT ##### -->
|
|
|
|
<para>
|
Documentation fixes.
* glib/gconvert.c, glib/grand.c, glib/ghash.c,
glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
* glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
glib/tmpl/conversions.sgml,
glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
glib/tmpl/hash_tables.sgml,
glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
Improve markup of examples, general consistency improvements.
2001-12-12 20:32:07 +00:00
|
|
|
Expands to the GNU C <literal>no_instrument_function</literal> function
|
|
|
|
attribute if the compiler is <command>gcc</command>. Functions with this
|
|
|
|
attribute will not be
|
2001-10-02 23:09:51 +00:00
|
|
|
instrumented for profiling, when the compiler is called with the
|
|
|
|
<option>-finstrument-functions</option> option.
|
2001-09-29 00:21:16 +00:00
|
|
|
See the GNU C documentation for details.
|
2001-09-10 15:50:02 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-08-25 05:02:57 +00:00
|
|
|
|
2004-09-18 21:03:46 +00:00
|
|
|
<!-- ##### MACRO G_HAVE_GNUC_VISIBILITY ##### -->
|
|
|
|
<para>
|
2004-10-26 16:10:52 +00:00
|
|
|
This macro is defined as 1 if the the compiler supports ELF visibility
|
|
|
|
attributes (currently only <command>gcc</command>).
|
2004-09-18 21:03:46 +00:00
|
|
|
</para>
|
|
|
|
|
2004-10-26 16:10:52 +00:00
|
|
|
Since: 2.6
|
2004-09-18 21:03:46 +00:00
|
|
|
|
|
|
|
|
2004-10-27 16:46:29 +00:00
|
|
|
|
Add a G_GNUC_INTERNAL macro to mark function declarations as internal and
2004-08-02 Matthias Clasen <mclasen@redhat.com>
* glib/gmacros.h: Add a G_GNUC_INTERNAL macro to mark function
declarations as internal and avoid PLT indirections for
them. (#145465, Arjan van de Ven)
* glib/gunicodeprivate.h:
* glib/gthreadinit.h:
* glib/gmessages.h:
* glib/gdebug.h:
* glib/gconvert.c: Use G_GNUC_INTERNAL for _g_charset_get_aliases(),
_g_debug_init(), _g_log_fallback_handler(), _g_mem_thread_init(),
_g_messages_thread_init(), _g_convert_thread_init(),
_g_rand_thread_init(), _g_main_thread_init(), _g_atomic_thread_init(),
_g_mem_thread_private_init(), _g_messages_thread_private_init(),
_g_utf8_normalize_wc() and _g_unichar_combining_class().
* glib/gatomic.c: Include gthreadinit.h here to see the declaration
for _g_atomic_thread_init().
2004-08-02 15:34:30 +00:00
|
|
|
<!-- ##### MACRO G_GNUC_INTERNAL ##### -->
|
|
|
|
<para>
|
|
|
|
Expands to the GNU C <literal>visibility(hidden)</literal> attribute if the
|
2004-10-26 16:10:52 +00:00
|
|
|
compiler supports it (currently only <command>gcc</command>). This attribute
|
|
|
|
can be used for marking library functions as being used internally to the lib
|
|
|
|
only, to not create inefficient PLT entries. Note that static functions do not
|
|
|
|
need to be marked as internal in this way. See the GNU C documentation for details.
|
Add a G_GNUC_INTERNAL macro to mark function declarations as internal and
2004-08-02 Matthias Clasen <mclasen@redhat.com>
* glib/gmacros.h: Add a G_GNUC_INTERNAL macro to mark function
declarations as internal and avoid PLT indirections for
them. (#145465, Arjan van de Ven)
* glib/gunicodeprivate.h:
* glib/gthreadinit.h:
* glib/gmessages.h:
* glib/gdebug.h:
* glib/gconvert.c: Use G_GNUC_INTERNAL for _g_charset_get_aliases(),
_g_debug_init(), _g_log_fallback_handler(), _g_mem_thread_init(),
_g_messages_thread_init(), _g_convert_thread_init(),
_g_rand_thread_init(), _g_main_thread_init(), _g_atomic_thread_init(),
_g_mem_thread_private_init(), _g_messages_thread_private_init(),
_g_utf8_normalize_wc() and _g_unichar_combining_class().
* glib/gatomic.c: Include gthreadinit.h here to see the declaration
for _g_atomic_thread_init().
2004-08-02 15:34:30 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
Since: 2.6
|
2001-09-10 15:50:02 +00:00
|
|
|
|
2004-08-25 05:02:57 +00:00
|
|
|
|
|
|
|
|
2002-11-20 21:50:16 +00:00
|
|
|
<!-- ##### MACRO G_LIKELY ##### -->
|
|
|
|
<para>
|
|
|
|
Hints the compiler that the expression is likely to evaluate to a true
|
|
|
|
value. The compiler may use this information for optimizations.
|
|
|
|
</para>
|
|
|
|
<informalexample><programlisting>
|
|
|
|
if (G_LIKELY (random () != 1))
|
|
|
|
g_print ("not one");
|
|
|
|
</programlisting></informalexample>
|
|
|
|
|
|
|
|
@expr: the expression
|
2002-12-05 22:32:20 +00:00
|
|
|
@Since: 2.2
|
2002-11-20 21:50:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_UNLIKELY ##### -->
|
|
|
|
<para>
|
|
|
|
Hints the compiler that the expression is unlikely to evaluate to a true
|
|
|
|
value. The compiler may use this information for optimizations.
|
|
|
|
</para>
|
|
|
|
<informalexample><programlisting>
|
|
|
|
if (G_UNLIKELY (random () == 1))
|
|
|
|
g_print ("a random one");
|
|
|
|
</programlisting></informalexample>
|
|
|
|
|
|
|
|
@expr: the expression
|
2002-12-05 22:32:20 +00:00
|
|
|
@Since: 2.2
|
2002-11-20 21:50:16 +00:00
|
|
|
|
|
|
|
|
2000-09-06 00:04:49 +00:00
|
|
|
<!-- ##### MACRO G_STRLOC ##### -->
|
1999-08-16 17:58:30 +00:00
|
|
|
<para>
|
2001-09-29 00:21:16 +00:00
|
|
|
Expands to a string identifying the current code position.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-02-24 19:27:19 +00:00
|
|
|
<!-- ##### MACRO G_STRFUNC ##### -->
|
|
|
|
<para>
|
2004-10-26 16:10:52 +00:00
|
|
|
Expands to a string identifying the current function.
|
2004-02-24 19:27:19 +00:00
|
|
|
</para>
|
|
|
|
|
2004-10-26 16:10:52 +00:00
|
|
|
@Since: 2.4
|
2004-02-24 19:27:19 +00:00
|
|
|
|
|
|
|
|
2003-07-28 23:00:05 +00:00
|
|
|
<!-- ##### MACRO G_GINT16_MODIFIER ##### -->
|
|
|
|
<para>
|
|
|
|
The platform dependent length modifier for constructing printf() conversion
|
2004-10-26 16:10:52 +00:00
|
|
|
specifiers for values of type #gint16 or #guint16. It is a string literal,
|
|
|
|
but doesn't include the percent-sign, such that you can add precision and
|
|
|
|
length modifiers between percent-sign and conversion specifier and append a
|
2003-07-28 23:00:05 +00:00
|
|
|
conversion specifier.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The following example prints "0x7b";
|
|
|
|
<informalexample>
|
|
|
|
<programlisting>
|
|
|
|
gint16 value = 123;
|
|
|
|
g_print ("%#" G_GINT16_MODIFIER "x", value);
|
|
|
|
</programlisting>
|
|
|
|
</informalexample>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Since: 2.4
|
|
|
|
|
|
|
|
|
2000-09-06 00:04:49 +00:00
|
|
|
<!-- ##### MACRO G_GINT16_FORMAT ##### -->
|
|
|
|
<para>
|
2000-10-30 16:08:23 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #gint16. It is a string literal, but doesn't
|
|
|
|
include the percent-sign, such that you can add precision and length
|
|
|
|
modifiers between percent-sign and conversion specifier.
|
|
|
|
</para>
|
2000-09-06 00:04:49 +00:00
|
|
|
|
2000-10-30 16:08:23 +00:00
|
|
|
<para>
|
|
|
|
<informalexample>
|
|
|
|
<programlisting>
|
|
|
|
gint16 in;
|
|
|
|
gint32 out;
|
|
|
|
sscanf ("42", "%" G_GINT16_FORMAT, &in)
|
|
|
|
out = in * 1000;
|
|
|
|
g_print ("%" G_GINT32_FORMAT, out);
|
|
|
|
</programlisting>
|
|
|
|
</informalexample>
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GUINT16_FORMAT ##### -->
|
|
|
|
<para>
|
2000-10-30 16:08:23 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #guint16. See also #G_GINT16_FORMAT.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-07-28 23:00:05 +00:00
|
|
|
<!-- ##### MACRO G_GINT32_MODIFIER ##### -->
|
|
|
|
<para>
|
|
|
|
The platform dependent length modifier for constructing printf() conversion
|
2004-10-26 16:10:52 +00:00
|
|
|
specifiers for values of type #gint32 or #guint32. See also #G_GINT16_MODIFIER.
|
2003-07-28 23:00:05 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@Since: 2.4
|
|
|
|
|
2003-09-12 00:17:02 +00:00
|
|
|
|
2000-09-06 00:04:49 +00:00
|
|
|
<!-- ##### MACRO G_GINT32_FORMAT ##### -->
|
|
|
|
<para>
|
2000-10-30 16:08:23 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #gint32. See also #G_GINT16_FORMAT.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GUINT32_FORMAT ##### -->
|
|
|
|
<para>
|
2000-10-30 16:08:23 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #guint32. See also #G_GINT16_FORMAT.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-07-28 23:00:05 +00:00
|
|
|
<!-- ##### MACRO G_GINT64_MODIFIER ##### -->
|
|
|
|
<para>
|
|
|
|
The platform dependent length modifier for constructing printf() conversion
|
2004-10-26 16:10:52 +00:00
|
|
|
specifiers for values of type #gint64 or #guint64. See also #G_GINT16_MODIFIER.
|
2003-07-28 23:00:05 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Some platforms do not support printing 64 bit integers,
|
|
|
|
even though the types are supported. On such platforms #G_GINT64_MODIFIER
|
|
|
|
is not defined.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
|
|
|
|
@Since: 2.4
|
|
|
|
|
2003-09-12 00:17:02 +00:00
|
|
|
|
2000-09-06 00:04:49 +00:00
|
|
|
<!-- ##### MACRO G_GINT64_FORMAT ##### -->
|
|
|
|
<para>
|
2000-10-30 16:08:23 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #gint64. See also #G_GINT16_FORMAT.
|
|
|
|
</para>
|
2000-09-06 00:04:49 +00:00
|
|
|
|
2000-10-30 16:08:23 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Some platforms do not support scanning and printing 64 bit integers,
|
2001-09-29 00:21:16 +00:00
|
|
|
even though the types are supported. On such platforms #G_GINT64_FORMAT
|
2003-07-28 23:00:05 +00:00
|
|
|
is not defined. Note that scanf() may not support 64 bit integers, even
|
|
|
|
if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
|
|
|
|
recommended for parsing anyway; consider using g_strtoull() instead.
|
2000-09-06 00:04:49 +00:00
|
|
|
</para>
|
2000-10-30 16:08:23 +00:00
|
|
|
</note>
|
2000-09-06 00:04:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GUINT64_FORMAT ##### -->
|
|
|
|
<para>
|
2000-10-30 16:08:23 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #guint64. See also #G_GINT16_FORMAT.
|
|
|
|
</para>
|
2000-09-06 00:04:49 +00:00
|
|
|
|
2000-10-30 16:08:23 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Some platforms do not support scanning and printing 64 bit integers,
|
2001-09-29 00:21:16 +00:00
|
|
|
even though the types are supported. On such platforms #G_GUINT64_FORMAT
|
2003-07-28 23:00:05 +00:00
|
|
|
is not defined. Note that scanf() may not support 64 bit integers, even
|
|
|
|
if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
|
|
|
|
recommended for parsing anyway; consider using g_strtoull() instead.
|
1999-08-16 17:58:30 +00:00
|
|
|
</para>
|
2000-10-30 16:08:23 +00:00
|
|
|
</note>
|
1999-08-16 17:58:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2004-02-24 19:27:19 +00:00
|
|
|
<!-- ##### MACRO G_GSIZE_MODIFIER ##### -->
|
|
|
|
<para>
|
2004-10-26 16:10:52 +00:00
|
|
|
The platform dependent length modifier for constructing printf() conversion
|
|
|
|
specifiers for values of type #gsize or #gssize. See also #G_GINT16_MODIFIER.
|
2004-02-24 19:27:19 +00:00
|
|
|
</para>
|
|
|
|
|
2004-10-26 16:10:52 +00:00
|
|
|
@Since: 2.6
|
2004-02-24 19:27:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GSIZE_FORMAT ##### -->
|
|
|
|
<para>
|
2004-10-26 16:10:52 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #gsize. See also #G_GINT16_FORMAT.
|
2004-02-24 19:27:19 +00:00
|
|
|
</para>
|
|
|
|
|
2004-10-26 16:10:52 +00:00
|
|
|
@Since: 2.6
|
2004-02-24 19:27:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_GSSIZE_FORMAT ##### -->
|
|
|
|
<para>
|
2004-10-26 16:10:52 +00:00
|
|
|
This is the platform dependent conversion specifier for scanning and
|
|
|
|
printing values of type #gssize. See also #G_GINT16_FORMAT.
|
2004-02-24 19:27:19 +00:00
|
|
|
</para>
|
|
|
|
|
2004-10-26 16:10:52 +00:00
|
|
|
@Since: 2.6
|
2004-02-24 19:27:19 +00:00
|
|
|
|
|
|
|
|