X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fdocs.c;h=5a20cf2f6c88d9e82580e6a5d04dd740c84ba43d;hb=0a4ee12c7a9dfc82443133dfb2b18fb411d79f48;hp=199aedaa62a86672f8d11090b227ce9f21a40abd;hpb=42cf80780b4fbbe9063ed3d962bb13f341757b3f;p=platform%2Fupstream%2Fglib.git diff --git a/glib/docs.c b/glib/docs.c index 199aeda..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,7 +275,7 @@ * 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) @@ -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,7 +731,7 @@ * 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; @@ -739,7 +739,7 @@ * ]| * 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; @@ -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". */ /** @@ -1702,7 +1702,7 @@ * arrays or arrays on the stack. */ -/ * Miscellaneous Macros {{{1 */ +/* Miscellaneous Macros {{{1 */ /** * SECTION:macros_misc @@ -1777,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!"; * ]| */ @@ -1798,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); @@ -1806,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); @@ -1846,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)) * ]| @@ -1859,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. */ /** @@ -1914,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. @@ -1950,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. @@ -1990,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. @@ -2078,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; * ]| @@ -2102,7 +2102,7 @@ * * See the GNU C documentation for more details. * - * |[ + * |[ * gint g_snprintf (gchar *string, * gulong n, * gchar const *format, @@ -2141,7 +2141,7 @@ * * See the GNU C documentation for more details. * - * |[ + * |[ * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2); * ]| */ @@ -2199,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. * @@ -2223,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, @@ -2253,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"); * ]| @@ -2270,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"); * ]| @@ -2294,6 +2294,12 @@ * Since: 2.4 */ +/** + * G_HAVE_GNUC_VISIBILITY: + * + * Defined to 1 if gcc-style visibility handling is supported. + */ + /* Windows Compatibility Functions {{{1 */ /** @@ -2319,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.