mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 20:29:21 +02:00
Mark functions with G_GNUC_MALLOC when appropriate.
2004-11-28 Matthias Clasen <mclasen@redhat.com> * glib/gconvert.h: * glib/gkeyfile.h: * glib/gmem.h: * glib/gstrfuncs.h: * glib/gunicode.h: * glib/gutils.h: Mark functions with G_GNUC_MALLOC when appropriate. * glib/glib.symbols: Add G_GNUC_MALLOC annotations. * glib/gmacros.h (G_GNUC_MALLOC): Add a macro for __attribute__((__malloc__)). (#61780)
This commit is contained in:
committed by
Matthias Clasen
parent
75a1d303ef
commit
379e87466d
@@ -159,7 +159,7 @@ void g_unicode_canonical_ordering (gunichar *string,
|
||||
string of Unicode characters. RESULT_LEN is set to the resulting
|
||||
length of the string. */
|
||||
gunichar *g_unicode_canonical_decomposition (gunichar ch,
|
||||
gsize *result_len);
|
||||
gsize *result_len) G_GNUC_MALLOC;
|
||||
|
||||
/* Array of skip-bytes-per-initial character.
|
||||
*/
|
||||
@@ -204,35 +204,35 @@ gunichar2 *g_utf8_to_utf16 (const gchar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error);
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gunichar * g_utf8_to_ucs4 (const gchar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error);
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gunichar * g_utf8_to_ucs4_fast (const gchar *str,
|
||||
glong len,
|
||||
glong *items_written);
|
||||
glong *items_written) G_GNUC_MALLOC;
|
||||
gunichar * g_utf16_to_ucs4 (const gunichar2 *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error);
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_utf16_to_utf8 (const gunichar2 *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error);
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gunichar2 *g_ucs4_to_utf16 (const gunichar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error);
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_ucs4_to_utf8 (const gunichar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error);
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
/* Convert a single character into UTF-8. outbuf must have at
|
||||
* least 6 bytes of space. Returns the number of bytes in the
|
||||
@@ -253,11 +253,11 @@ gboolean g_utf8_validate (const gchar *str,
|
||||
gboolean g_unichar_validate (gunichar ch);
|
||||
|
||||
gchar *g_utf8_strup (const gchar *str,
|
||||
gssize len);
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
gchar *g_utf8_strdown (const gchar *str,
|
||||
gssize len);
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
gchar *g_utf8_casefold (const gchar *str,
|
||||
gssize len);
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
|
||||
typedef enum {
|
||||
G_NORMALIZE_DEFAULT,
|
||||
@@ -272,12 +272,12 @@ typedef enum {
|
||||
|
||||
gchar *g_utf8_normalize (const gchar *str,
|
||||
gssize len,
|
||||
GNormalizeMode mode);
|
||||
GNormalizeMode mode) G_GNUC_MALLOC;
|
||||
|
||||
gint g_utf8_collate (const gchar *str1,
|
||||
const gchar *str2);
|
||||
gchar *g_utf8_collate_key (const gchar *str,
|
||||
gssize len);
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
|
||||
gboolean g_unichar_get_mirror_char (gunichar ch,
|
||||
gunichar *mirrored_ch);
|
||||
|
Reference in New Issue
Block a user