mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-14 04:57:46 +02:00
Merge branch '2414-wrap-code-example' into 'master'
docs: Wrap a code example more tightly to reduce minimum page width Closes #2414 See merge request GNOME/glib!2129
This commit is contained in:
@@ -201,8 +201,11 @@ How to run and debug your GLib application
|
|||||||
reproduced with <literal>G_SLICE=always-malloc</literal>, but will
|
reproduced with <literal>G_SLICE=always-malloc</literal>, but will
|
||||||
be caught by <literal>G_SLICE=debug-blocks</literal> is as follows:
|
be caught by <literal>G_SLICE=debug-blocks</literal> is as follows:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void *slist = g_slist_alloc (); /* void* gives up type-safety */
|
/* void* gives up type-safety */
|
||||||
g_list_free (slist); /* corruption: sizeof (GSList) != sizeof (GList) */
|
void *slist = g_slist_alloc ();
|
||||||
|
|
||||||
|
/* corruption: sizeof (GSList) != sizeof (GList) */
|
||||||
|
g_list_free (slist);
|
||||||
</programlisting></para>
|
</programlisting></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
Reference in New Issue
Block a user