use g_try_malloc and return error on not-enough-memory

2001-12-16  Havoc Pennington  <hp@pobox.com>

	* glib/gfileutils.c (get_contents_regfile): use g_try_malloc and
	return error on not-enough-memory
	(get_contents_stdio): ditto
This commit is contained in:
Havoc Pennington
2001-12-18 18:46:41 +00:00
committed by Havoc Pennington
parent 7a1088bc50
commit b0a42f2058
11 changed files with 162 additions and 72 deletions

View File

@@ -46,6 +46,62 @@ Parameter Specifications
@parent_instance:
<!-- ##### ENUM GTypeFundamentals ##### -->
<para>
The predefined identifiers of the reserved fundamental types.
</para>
@G_TYPE_INVALID: Usually a return value indicating an error.
@G_TYPE_NONE: A synonym for the "void" type in C.
@G_TYPE_INTERFACE: Root type of all interface types.
@G_TYPE_CHAR: Identifier for the built-in type "gchar".
@G_TYPE_UCHAR: Identifier for the built-in type "guchar".
@G_TYPE_BOOLEAN: Identifier for the built-in type "gboolean".
@G_TYPE_INT: Identifier for the built-in type "gint".
@G_TYPE_UINT: Identifier for the built-in type "guint".
@G_TYPE_LONG: Identifier for the built-in type "glong".
@G_TYPE_ULONG: Identifier for the built-in type "gulong".
@G_TYPE_INT64:
@G_TYPE_UINT64:
@G_TYPE_ENUM: Identifier for the "#GEnum" type.
@G_TYPE_FLAGS: Identifier for the "#GFlags" type.
@G_TYPE_FLOAT: Identifier for the built-in type "gfloat".
@G_TYPE_DOUBLE: Identifier for the built-in type "gdouble".
@G_TYPE_STRING: Identifier for a pointer to a null-terminated string "gchar*".
@G_TYPE_POINTER: Identifier for anonymous pointers "void*".
@G_TYPE_BOXED: Identifier for the "#GBoxed" type.
@G_TYPE_PARAM: Identifier for the "#GParam" type.
@G_TYPE_OBJECT: Identifier for the "#GObject" type.
@G_TYPE_RESERVED_BSE_FIRST: First fundamental type ID reserved for BSE.
@G_TYPE_RESERVED_BSE_LAST: Last fundamental type ID reserved for BSE.
@G_TYPE_RESERVED_LAST_FUNDAMENTAL:
@G_TYPE_CONSTANT_TYPES:
@G_TYPE_CLOSURE:
@G_TYPE_VALUE:
@G_TYPE_VALUE_ARRAY:
@G_TYPE_GSTRING:
@G_TYPE_PARAM_CHAR:
@G_TYPE_PARAM_UCHAR:
@G_TYPE_PARAM_BOOLEAN:
@G_TYPE_PARAM_INT:
@G_TYPE_PARAM_UINT:
@G_TYPE_PARAM_LONG:
@G_TYPE_PARAM_ULONG:
@G_TYPE_PARAM_INT64:
@G_TYPE_PARAM_UINT64:
@G_TYPE_PARAM_UNICHAR:
@G_TYPE_PARAM_ENUM:
@G_TYPE_PARAM_FLAGS:
@G_TYPE_PARAM_FLOAT:
@G_TYPE_PARAM_DOUBLE:
@G_TYPE_PARAM_STRING:
@G_TYPE_PARAM_PARAM:
@G_TYPE_PARAM_BOXED:
@G_TYPE_PARAM_POINTER:
@G_TYPE_PARAM_VALUE_ARRAY:
@G_TYPE_PARAM_CLOSURE:
@G_TYPE_PARAM_OBJECT:
<!-- ##### MACRO G_IS_PARAM_SPEC_CLOSURE ##### -->
<para>

View File

@@ -161,62 +161,6 @@ interfaces and C++ classes containing only pure virtual functions.
@type: A #GType value.
<!-- ##### ENUM GTypeFundamentals ##### -->
<para>
The predefined identifiers of the reserved fundamental types.
</para>
@G_TYPE_INVALID: Usually a return value indicating an error.
@G_TYPE_NONE: A synonym for the "void" type in C.
@G_TYPE_INTERFACE: Root type of all interface types.
@G_TYPE_CHAR: Identifier for the built-in type "gchar".
@G_TYPE_UCHAR: Identifier for the built-in type "guchar".
@G_TYPE_BOOLEAN: Identifier for the built-in type "gboolean".
@G_TYPE_INT: Identifier for the built-in type "gint".
@G_TYPE_UINT: Identifier for the built-in type "guint".
@G_TYPE_LONG: Identifier for the built-in type "glong".
@G_TYPE_ULONG: Identifier for the built-in type "gulong".
@G_TYPE_INT64:
@G_TYPE_UINT64:
@G_TYPE_ENUM: Identifier for the "#GEnum" type.
@G_TYPE_FLAGS: Identifier for the "#GFlags" type.
@G_TYPE_FLOAT: Identifier for the built-in type "gfloat".
@G_TYPE_DOUBLE: Identifier for the built-in type "gdouble".
@G_TYPE_STRING: Identifier for a pointer to a null-terminated string "gchar*".
@G_TYPE_POINTER: Identifier for anonymous pointers "void*".
@G_TYPE_BOXED: Identifier for the "#GBoxed" type.
@G_TYPE_PARAM: Identifier for the "#GParam" type.
@G_TYPE_OBJECT: Identifier for the "#GObject" type.
@G_TYPE_RESERVED_BSE_FIRST: First fundamental type ID reserved for BSE.
@G_TYPE_RESERVED_BSE_LAST: Last fundamental type ID reserved for BSE.
@G_TYPE_RESERVED_LAST_FUNDAMENTAL:
@G_TYPE_CONSTANT_TYPES:
@G_TYPE_CLOSURE:
@G_TYPE_VALUE:
@G_TYPE_VALUE_ARRAY:
@G_TYPE_GSTRING:
@G_TYPE_PARAM_CHAR:
@G_TYPE_PARAM_UCHAR:
@G_TYPE_PARAM_BOOLEAN:
@G_TYPE_PARAM_INT:
@G_TYPE_PARAM_UINT:
@G_TYPE_PARAM_LONG:
@G_TYPE_PARAM_ULONG:
@G_TYPE_PARAM_INT64:
@G_TYPE_PARAM_UINT64:
@G_TYPE_PARAM_UNICHAR:
@G_TYPE_PARAM_ENUM:
@G_TYPE_PARAM_FLAGS:
@G_TYPE_PARAM_FLOAT:
@G_TYPE_PARAM_DOUBLE:
@G_TYPE_PARAM_STRING:
@G_TYPE_PARAM_PARAM:
@G_TYPE_PARAM_BOXED:
@G_TYPE_PARAM_POINTER:
@G_TYPE_PARAM_VALUE_ARRAY:
@G_TYPE_PARAM_CLOSURE:
@G_TYPE_PARAM_OBJECT:
<!-- ##### STRUCT GTypeInterface ##### -->
<para>
An opaque structure used as the base of all interface types.