X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fdocs.c;h=5a20cf2f6c88d9e82580e6a5d04dd740c84ba43d;hb=7e3d32b7053b47ca7feecf185abac96b619770c2;hp=c73dfc2be7d40a98978dfe645319de994961eb58;hpb=64eface479baf3db06f0f42b43f391db55b5ad4d;p=platform%2Fupstream%2Fglib.git diff --git a/glib/docs.c b/glib/docs.c index c73dfc2..5a20cf2 100644 --- a/glib/docs.c +++ b/glib/docs.c @@ -259,7 +259,7 @@ * and conversion specifier and append a conversion specifier. * * The following example prints "0x7b"; - * |[ + * |[ * gint16 value = 123; * g_print ("%#" G_GINT16_MODIFIER "x", value); * ]| @@ -275,10 +275,10 @@ * include the percent-sign, such that you can add precision and length * modifiers between percent-sign and conversion specifier. * - * |[ + * |[ * gint16 in; * gint32 out; - * sscanf ("42", "%" G_GINT16_FORMAT, &in) + * sscanf ("42", "%" G_GINT16_FORMAT, &in) * out = in * 1000; * g_print ("%" G_GINT32_FORMAT, out); * ]| @@ -721,7 +721,7 @@ * data" to a callback, in the form of a void pointer. From time to time * you want to pass an integer instead of a pointer. You could allocate * an integer, with something like: - * |[ + * |[ * int *ip = g_new (int, 1); * *ip = 42; * ]| @@ -731,15 +731,15 @@ * Pointers are always at least 32 bits in size (on all platforms GLib * intends to support). Thus you can store at least 32-bit integer values * in a pointer value. Naively, you might try this, but it's incorrect: - * |[ + * |[ * gpointer p; * int i; * p = (void*) 42; * i = (int) p; * ]| - * Again, that example was not correct, don't copy it. + * Again, that example was not correct, don't copy it. * The problem is that on some systems you need to do this: - * |[ + * |[ * gpointer p; * int i; * p = (void*) (long) 42; @@ -761,9 +761,9 @@ * Stuffs an integer into a pointer type. * * Remember, you may not store pointers in integers. This is not portable - * in any way, shape or form. These macros only allow - * storing integers in pointers, and only preserve 32 bits of the - * integer; values outside the range of a 32-bit integer will be mangled. + * in any way, shape or form. These macros only allow storing integers in + * pointers, and only preserve 32 bits of the integer; values outside the + * range of a 32-bit integer will be mangled. */ /** @@ -774,9 +774,9 @@ * been stored in the pointer with GINT_TO_POINTER(). * * Remember, you may not store pointers in integers. This is not portable - * in any way, shape or form. These macros only allow - * storing integers in pointers, and only preserve 32 bits of the - * integer; values outside the range of a 32-bit integer will be mangled. + * in any way, shape or form. These macros only allow storing integers in + * pointers, and only preserve 32 bits of the integer; values outside the + * range of a 32-bit integer will be mangled. */ /** @@ -1428,7 +1428,7 @@ * sign, mantissa and exponent of IEEE floats and doubles. These unions are * defined as appropriate for a given platform. IEEE floats and doubles are * supported (used for storage) by at least Intel, PPC and Sparc. See - * IEEE 754-2008 + * [IEEE 754-2008](http://en.wikipedia.org/wiki/IEEE_float) * for more information about IEEE number formats. */ @@ -1526,14 +1526,14 @@ * G_OS_WIN32: * * This macro is defined only on Windows. So you can bracket - * Windows-specific code in "#ifdef G_OS_WIN32". + * Windows-specific code in "\#ifdef G_OS_WIN32". */ /** * G_OS_UNIX: * * This macro is defined only on UNIX. So you can bracket - * UNIX-specific code in "#ifdef G_OS_UNIX". + * UNIX-specific code in "\#ifdef G_OS_UNIX". */ /** @@ -1679,19 +1679,17 @@ /** * G_CONST_RETURN: * - * If G_DISABLE_CONST_RETURNS is defined, this macro expands - * to nothing. By default, the macro expands to const. - * The macro should be used in place of const for - * functions that return a value that should not be modified. The - * purpose of this macro is to allow us to turn on const - * for returned constant strings by default, while allowing programmers - * who find that annoying to turn it off. This macro should only be used - * for return values and for out parameters, it doesn't - * make sense for in parameters. + * If %G_DISABLE_CONST_RETURNS is defined, this macro expands + * to nothing. By default, the macro expands to const. The macro + * can be used in place of const for functions that return a value + * that should not be modified. The purpose of this macro is to allow + * us to turn on const for returned constant strings by default, while + * allowing programmers who find that annoying to turn it off. This macro + * should only be used for return values and for "out" parameters, it + * doesn't make sense for "in" parameters. * * Deprecated: 2.30: API providers should replace all existing uses with - * const and API consumers should adjust their code - * accordingly + * const and API consumers should adjust their code accordingly */ /** @@ -1704,7 +1702,7 @@ * arrays or arrays on the stack. */ -/ * Miscellaneous Macros {{{1 */ +/* Miscellaneous Macros {{{1 */ /** * SECTION:macros_misc @@ -1779,14 +1777,14 @@ * Accepts a macro or a string and converts it into a string after * preprocessor argument expansion. For example, the following code: * - * |[ + * |[ * #define AGE 27 * const gchar *greeting = G_STRINGIFY (AGE) " today!"; * ]| * * is transformed by the preprocessor into (code equivalent to): * - * |[ + * |[ * const gchar *greeting = "27 today!"; * ]| */ @@ -1800,7 +1798,7 @@ * @identifier1identifier2 from its expanded * arguments @identifier1 and @identifier2. For example, * the following code: - * |[ + * |[ * #define GET(traveller,method) G_PASTE(traveller_get_, method) (traveller) * const gchar *name = GET (traveller, name); * const gchar *quest = GET (traveller, quest); @@ -1808,7 +1806,7 @@ * ]| * * is transformed by the preprocessor into: - * |[ + * |[ * const gchar *name = traveller_get_name (traveller); * const gchar *quest = traveller_get_quest (traveller); * GdkColor *favourite = traveller_get_favourite_colour (traveller); @@ -1848,7 +1846,7 @@ * Its value should be ignored. This can be accomplished by placing * it as the first argument of a comma expression. * - * |[ + * |[ * #define ADD_ONE_TO_INT(x) \ * (G_STATIC_ASSERT_EXPR(sizeof (x) == sizeof (int)), ((x) + 1)) * ]| @@ -1861,7 +1859,7 @@ * * Expands to __extension__ when gcc is used as the compiler. This simply * tells gcc not to warn about the following non-standard code when compiling - * with the option. + * with the `-pedantic` option. */ /** @@ -1916,10 +1914,10 @@ * G_GNUC_ALLOC_SIZE: * @x: the index of the argument specifying the allocation size * - * Expands to the GNU C alloc_size function attribute if the compiler is - * a new enough gcc. This attribute tells the compiler that the function - * returns a pointer to memory of a size that is specified by the @xth - * function parameter. + * Expands to the GNU C alloc_size function attribute if the compiler + * is a new enough gcc. This attribute tells the compiler that the + * function returns a pointer to memory of a size that is specified + * by the @xth function parameter. * * Place the attribute after the function declaration, just before the * semicolon. @@ -1952,7 +1950,7 @@ * * Expands to the GNU C deprecated attribute if the compiler is gcc. * It can be used to mark typedefs, variables and functions as deprecated. - * When called with the option, + * When called with the `-Wdeprecated-declarations` option, * gcc will generate warnings when deprecated interfaces are used. * * Place the attribute after the declaration, just before the semicolon. @@ -1992,8 +1990,8 @@ * regression tests for deprecated functions. * * Use %G_GNUC_END_IGNORE_DEPRECATIONS to begin warning again. (If you - * are not compiling with -Wdeprecated-declarations - * then neither macro has any effect.) + * are not compiling with `-Wdeprecated-declarations` then neither macro + * has any effect.) * * This macro can be used either inside or outside of a function body, * but must appear on a line by itself. @@ -2080,7 +2078,7 @@ * semicolon. For arguments, place the attribute at the beginning of the * argument declaration. * - * |[ + * |[ * void my_unused_function (G_GNUC_UNUSED gint unused_argument, * gint other_argument) G_GNUC_UNUSED; * ]| @@ -2104,7 +2102,7 @@ * * See the GNU C documentation for more details. * - * |[ + * |[ * gint g_snprintf (gchar *string, * gulong n, * gchar const *format, @@ -2143,7 +2141,7 @@ * * See the GNU C documentation for more details. * - * |[ + * |[ * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2); * ]| */ @@ -2201,7 +2199,7 @@ * Expands to the GNU C no_instrument_function function attribute if the * compiler is gcc. Functions with this attribute will not be instrumented * for profiling, when the compiler is called with the - * option. + * `-finstrument-functions` option. * * Place the attribute after the declaration, just before the semicolon. * @@ -2225,7 +2223,7 @@ * function declaration. While GCC allows the macro after the declaration, * Sun Studio does not. * - * |[ + * |[ * G_GNUC_INTERNAL * void _g_log_fallback_handler (const gchar *log_domain, * GLogLevelFlags log_level, @@ -2255,7 +2253,7 @@ * Hints the compiler that the expression is likely to evaluate to * a true value. The compiler may use this information for optimizations. * - * |[ + * |[ * if (G_LIKELY (random () != 1)) * g_print ("not one"); * ]| @@ -2272,7 +2270,7 @@ * Hints the compiler that the expression is unlikely to evaluate to * a true value. The compiler may use this information for optimizations. * - * |[ + * |[ * if (G_UNLIKELY (random () == 1)) * g_print ("a random one"); * ]| @@ -2296,6 +2294,12 @@ * Since: 2.4 */ +/** + * G_HAVE_GNUC_VISIBILITY: + * + * Defined to 1 if gcc-style visibility handling is supported. + */ + /* Windows Compatibility Functions {{{1 */ /** @@ -2321,8 +2325,8 @@ * @static: empty or "static" * @dll_name: the name of the (pointer to the) char array where * the DLL name will be stored. If this is used, you must also - * include windows.h. If you need a more - * complex DLL entry point function, you cannot use this + * include `windows.h`. If you need a more complex DLL entry + * point function, you cannot use this * * On Windows, this macro defines a DllMain() function that stores * the actual DLL name that the code being compiled will be included in.