* |[<!-- language="C" -->
* GArray *garray;
* gint i;
- * /* We create a new array to store gint values.
- * * We don't want it zero-terminated or cleared to 0's.
- * */
+ * // We create a new array to store gint values.
+ * // We don't want it zero-terminated or cleared to 0's.
* garray = g_array_new (FALSE, FALSE, sizeof (gint));
* for (i = 0; i < 10000; i++)
* g_array_append_val (garray, i);
* This example gets a pointer to an element in a #GArray:
* |[<!-- language="C" -->
* EDayViewEvent *event;
- * /* This gets a pointer to the 4th element
- * * in the array of EDayViewEvent structs.
- * */
+ * // This gets a pointer to the 4th element in the array of
+ * // EDayViewEvent structs.
* event = &g_array_index (events, EDayViewEvent, 3);
* ]|
*
* An example using a #GPtrArray:
* |[<!-- language="C" -->
* GPtrArray *array;
- * gchar *string1 = "one", *string2 = "two", *string3 = "three";
+ * gchar *string1 = "one";
+ * gchar *string2 = "two";
+ * gchar *string3 = "three";
*
- * gparray = g_ptr_array_new ();
+ * array = g_ptr_array_new ();
* g_ptr_array_add (array, (gpointer) string1);
* g_ptr_array_add (array, (gpointer) string2);
* g_ptr_array_add (array, (gpointer) string3);
real->data = data;
real->len = len;
+ real->alloc = len;
return array;
}