[glib] Make g_error_new_valist public



commit 01b79d67ef0294dd633ccb0998a6d9053772da05
Author: Yeti <yeti physics muni cz>
Date:   Mon Apr 20 13:22:17 2009 +0200

    Make g_error_new_valist public
    
    Bug #569024.
---
 docs/reference/glib/glib-sections.txt         |    1 +
 docs/reference/glib/tmpl/error_reporting.sgml |   12 ++++++++++++
 glib/gerror.c                                 |   16 +++++++++++++++-
 glib/gerror.h                                 |    6 ++++++
 glib/glib.symbols                             |    1 +
 5 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index 2f3d954..6089b50 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -388,6 +388,7 @@ G_HAVE_GROWING_STACK
 GError
 g_error_new
 g_error_new_literal
+g_error_new_valist
 g_error_free
 g_error_copy
 g_error_matches
diff --git a/docs/reference/glib/tmpl/error_reporting.sgml b/docs/reference/glib/tmpl/error_reporting.sgml
index 156f707..fc3284c 100644
--- a/docs/reference/glib/tmpl/error_reporting.sgml
+++ b/docs/reference/glib/tmpl/error_reporting.sgml
@@ -415,6 +415,18 @@ information about an error that has occurred.
 @Returns: 
 
 
+<!-- ##### FUNCTION g_error_new_valist ##### -->
+<para>
+
+</para>
+
+ domain: 
+ code: 
+ format: 
+ args: 
+ Returns: 
+
+
 <!-- ##### FUNCTION g_error_free ##### -->
 <para>
 
diff --git a/glib/gerror.c b/glib/gerror.c
index 9408560..5af7026 100644
--- a/glib/gerror.c
+++ b/glib/gerror.c
@@ -30,7 +30,21 @@
 #include "galias.h"
 
 
-static GError* 
+/**
+ * g_error_new_valist:
+ * @domain: error domain
+ * @code: error code
+ * @format: printf()-style format for error message
+ * @var_args: #va_list of parameters for the message format
+ *
+ * Creates a new #GError with the given @domain and @code,
+ * and a message formatted with @format.
+ *
+ * Returns: a new #GError
+ *
+ * Since: 2.22
+ **/
+GError*
 g_error_new_valist (GQuark         domain,
                     gint           code,
                     const gchar   *format,
diff --git a/glib/gerror.h b/glib/gerror.h
index d3d42d5..b303487 100644
--- a/glib/gerror.h
+++ b/glib/gerror.h
@@ -25,6 +25,8 @@
 #ifndef __G_ERROR_H__
 #define __G_ERROR_H__
 
+#include <stdarg.h>
+
 #include <glib/gquark.h>
 
 G_BEGIN_DECLS
@@ -46,6 +48,10 @@ GError*  g_error_new           (GQuark         domain,
 GError*  g_error_new_literal   (GQuark         domain,
                                 gint           code,
                                 const gchar   *message);
+GError*  g_error_new_valist    (GQuark         domain,
+                                gint           code,
+                                const gchar   *format,
+                                va_list        args);
 
 void     g_error_free          (GError        *error);
 GError*  g_error_copy          (const GError  *error);
diff --git a/glib/glib.symbols b/glib/glib.symbols
index f8410ca..7b4a886 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -348,6 +348,7 @@ g_error_free
 g_error_matches
 g_error_new G_GNUC_PRINTF(3,4)
 g_error_new_literal
+g_error_new_valist
 g_propagate_error
 g_set_error G_GNUC_PRINTF(4,5)
 g_set_error_literal



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]