gobject-introspection r1077 - in trunk: . girepository tests/scanner
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r1077 - in trunk: . girepository tests/scanner
- Date: Thu, 29 Jan 2009 10:43:05 +0000 (UTC)
Author: racarr
Date: Thu Jan 29 10:43:05 2009
New Revision: 1077
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=1077&view=rev
Log:
Undo revision 1075
Modified:
trunk/ChangeLog
trunk/girepository/girparser.c
trunk/tests/scanner/foo.h
Modified: trunk/girepository/girparser.c
==============================================================================
--- trunk/girepository/girparser.c (original)
+++ trunk/girepository/girparser.c Thu Jan 29 10:43:05 2009
@@ -2976,19 +2976,18 @@
}
static GList *
-post_filter_varargs_functions (GList *list, GList ** varargs_callbacks_out)
+post_filter_varargs_functions (GList *list)
{
GList *iter;
- GList *varargs_callbacks = *varargs_callbacks_out;
-
+
iter = list;
while (iter)
{
GList *link = iter;
GIrNode *node = iter->data;
-
+
iter = iter->next;
-
+
if (node->type == G_IR_NODE_FUNCTION)
{
if (((GIrNodeFunction*)node)->is_varargs)
@@ -2996,60 +2995,7 @@
list = g_list_delete_link (list, link);
}
}
- if (node->type == G_IR_NODE_CALLBACK)
- {
- if (((GIrNodeFunction*)node)->is_varargs)
- {
- varargs_callbacks = g_list_append(varargs_callbacks,
- node);
- list = g_list_delete_link (list, link);
- }
- }
- }
- iter = list;
- while (iter)
- {
- GList *link = iter;
- GIrNode *node = iter->data;
-
- iter = iter->next;
-
- if (node->type == G_IR_NODE_FUNCTION)
- {
- GList *param;
- gboolean function_done = FALSE;
-
- for (param = ((GIrNodeFunction *)node)->parameters;
- param;
- param = param->next)
- {
- GIrNodeParam *node = (GIrNodeParam *)param->data;
-
- if (function_done)
- break;
-
- if (node->type->is_interface)
- {
- GList *callback;
- for (callback = varargs_callbacks;
- callback;
- callback = callback->next)
- {
- if (!strcmp(node->type->interface,
- ((GIrNode *)varargs_callbacks->data)->name))
- {
- list = g_list_delete_link (list, link);
- function_done = TRUE;
- break;
- }
- }
- }
- }
- }
}
-
- *varargs_callbacks_out = varargs_callbacks;
-
return list;
}
@@ -3057,44 +3003,37 @@
post_filter (GIrModule *module)
{
GList *iter;
- GList *varargs_callbacks = NULL;
-
- module->entries = post_filter_varargs_functions (module->entries,
- &varargs_callbacks);
+
+ module->entries = post_filter_varargs_functions (module->entries);
iter = module->entries;
while (iter)
{
GIrNode *node = iter->data;
-
+
iter = iter->next;
if (node->type == G_IR_NODE_OBJECT ||
node->type == G_IR_NODE_INTERFACE)
{
GIrNodeInterface *iface = (GIrNodeInterface*)node;
- iface->members = post_filter_varargs_functions (iface->members,
- &varargs_callbacks);
+ iface->members = post_filter_varargs_functions (iface->members);
}
else if (node->type == G_IR_NODE_BOXED)
{
GIrNodeBoxed *boxed = (GIrNodeBoxed*)node;
- boxed->members = post_filter_varargs_functions (boxed->members,
- &varargs_callbacks);
+ boxed->members = post_filter_varargs_functions (boxed->members);
}
else if (node->type == G_IR_NODE_STRUCT)
{
GIrNodeStruct *iface = (GIrNodeStruct*)node;
- iface->members = post_filter_varargs_functions (iface->members,
- &varargs_callbacks);
+ iface->members = post_filter_varargs_functions (iface->members);
}
else if (node->type == G_IR_NODE_UNION)
{
GIrNodeUnion *iface = (GIrNodeUnion*)node;
- iface->members = post_filter_varargs_functions (iface->members,
- &varargs_callbacks);
+ iface->members = post_filter_varargs_functions (iface->members);
}
}
- g_list_free(varargs_callbacks);
}
/**
Modified: trunk/tests/scanner/foo.h
==============================================================================
--- trunk/tests/scanner/foo.h (original)
+++ trunk/tests/scanner/foo.h Thu Jan 29 10:43:05 2009
@@ -293,12 +293,6 @@
void foo_test_const_char_param (const char * param);
void foo_test_const_struct_param (const FooStruct * param);
-typedef void (*FooVarargsCallback) (const char * param, ...);
-void foo_test_varargs_callback (gint i, FooVarargsCallback callback);
-void foo_test_varargs_callback2 (FooVarargsCallback callback);
-void foo_test_varargs_callback3 (FooVarargsCallback callback,
- FooVarargsCallback callback2);
-
typedef enum {
FOO_ERROR_GOOD,
FOO_ERROR_BAD,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]