* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include "config.h"
+
#include "glib.h"
+#include "galias.h"
+
static GError*
-g_error_new_valist(GQuark domain,
- gint code,
- const gchar *format,
- va_list args)
+g_error_new_valist (GQuark domain,
+ gint code,
+ const gchar *format,
+ va_list args)
{
GError *error;
- error = g_new (GError, 1);
+ error = g_slice_new (GError);
error->domain = domain;
error->code = code;
* g_error_new:
* @domain: error domain
* @code: error code
- * @format: <function>printf()</function>-style format for error message
+ * @format: printf()-style format for error message
* @Varargs: parameters for message format
*
* Creates a new #GError with the given @domain and @code,
* @message: error message
*
* Creates a new #GError; unlike g_error_new(), @message is not
- * a <function>printf()</function>-style format string. Use this
+ * a printf()-style format string. Use this
* function if @message contains text you don't have control over,
- * that could include <function>printf()</function> escape sequences.
+ * that could include printf() escape sequences.
*
* Return value: a new #GError
**/
g_return_val_if_fail (message != NULL, NULL);
g_return_val_if_fail (domain != 0, NULL);
- err = g_new (GError, 1);
+ err = g_slice_new (GError);
err->domain = domain;
err->code = code;
g_free (error->message);
- g_free (error);
+ g_slice_free (GError, error);
}
/**
g_return_val_if_fail (error != NULL, NULL);
- copy = g_new (GError, 1);
+ copy = g_slice_new (GError);
*copy = *error;
* @err: a return location for a #GError, or %NULL
* @domain: error domain
* @code: error code
- * @format: <function>printf()</function>-style format
+ * @format: printf()-style format
* @Varargs: args for @format
*
* Does nothing if @err is %NULL; if @err is non-%NULL, then *@err must
*err = NULL;
}
}
+
+#define __G_ERROR_C__
+#include "galiasdef.c"