]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkargcollector.c
Added notice to look in AUTHORS and ChangeLog files for a list of changes.
[~andy/gtk] / gtk / gtkargcollector.c
index 32a0ec7847374c4c08f56cb4f65f36ba4d9349c4..e92316d6c39cb9eae1c4526a907fd8af4e7b994d 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+/*
+ * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ */
+
 /* collect a single argument value from a va_list.
  * this is implemented as a huge macro <shrug>, because we can't
  * pass va_list variables by reference on some systems.
- * the former prototype was:
+ * the corresponding prototype would be:
  * static inline gchar*
- * gtk_arg_collect_value (GtkType  fundamental_type,
- *                       GtkArg  *arg,
+ * gtk_arg_collect_value (GtkArg  *arg,
  *                       va_list  var_args);
  */
-#define        GTK_ARG_COLLECT_VALUE(_ft, arg, var_args, _error)       \
+#define        GTK_ARG_COLLECT_VALUE(arg, var_args, _error)    \
 G_STMT_START { \
-  GtkType fundamental_type = _ft; \
   gchar *error_msg; \
+  GtkType fundamental_type; \
+  \
+  fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type); \
+  if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST) \
+    { \
+      fundamental_type = gtk_type_get_varargs_type (fundamental_type); \
+      if (!fundamental_type) \
+        fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type); \
+    } \
  \
   error_msg = NULL; \
   switch (fundamental_type) \