mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	Annotate the GString constructors
Otherwise the introspection scanner won't recognise them as constructors, because the GString get_type function has a different symbol prefix. See: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/399
This commit is contained in:
		@@ -104,16 +104,15 @@ g_string_maybe_expand (GString *string,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * g_string_sized_new:
 | 
			
		||||
 * @dfl_size: the default size of the space allocated to
 | 
			
		||||
 *     hold the string
 | 
			
		||||
 * g_string_sized_new: (constructor)
 | 
			
		||||
 * @dfl_size: the default size of the space allocated to hold the string
 | 
			
		||||
 *
 | 
			
		||||
 * Creates a new #GString, with enough space for @dfl_size
 | 
			
		||||
 * bytes. This is useful if you are going to add a lot of
 | 
			
		||||
 * text to the string and don't want it to be reallocated
 | 
			
		||||
 * too often.
 | 
			
		||||
 *
 | 
			
		||||
 * Returns: the new #GString
 | 
			
		||||
 * Returns: (transfer full): the new #GString
 | 
			
		||||
 */
 | 
			
		||||
GString *
 | 
			
		||||
g_string_sized_new (gsize dfl_size)
 | 
			
		||||
@@ -131,13 +130,13 @@ g_string_sized_new (gsize dfl_size)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * g_string_new:
 | 
			
		||||
 * g_string_new: (constructor)
 | 
			
		||||
 * @init: (nullable): the initial text to copy into the string, or %NULL to
 | 
			
		||||
 *   start with an empty string
 | 
			
		||||
 *
 | 
			
		||||
 * Creates a new #GString, initialized with the given string.
 | 
			
		||||
 *
 | 
			
		||||
 * Returns: the new #GString
 | 
			
		||||
 * Returns: (transfer full): the new #GString
 | 
			
		||||
 */
 | 
			
		||||
GString *
 | 
			
		||||
g_string_new (const gchar *init)
 | 
			
		||||
@@ -160,7 +159,7 @@ g_string_new (const gchar *init)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * g_string_new_len:
 | 
			
		||||
 * g_string_new_len: (constructor)
 | 
			
		||||
 * @init: initial contents of the string
 | 
			
		||||
 * @len: length of @init to use
 | 
			
		||||
 *
 | 
			
		||||
@@ -172,7 +171,7 @@ g_string_new (const gchar *init)
 | 
			
		||||
 * responsibility to ensure that @init has at least @len addressable
 | 
			
		||||
 * bytes.
 | 
			
		||||
 *
 | 
			
		||||
 * Returns: a new #GString
 | 
			
		||||
 * Returns: (transfer full): a new #GString
 | 
			
		||||
 */
 | 
			
		||||
GString *
 | 
			
		||||
g_string_new_len (const gchar *init,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user