seed r318 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r318 - trunk/libseed
- Date: Mon, 24 Nov 2008 03:27:59 +0000 (UTC)
Author: racarr
Date: Mon Nov 24 03:27:59 2008
New Revision: 318
URL: http://svn.gnome.org/viewvc/seed?rev=318&view=rev
Log:
Refactor struct code for GObject instances to use the same code as the rest of the struct madness. Notably, adds support for GObjects with nested structs.
Modified:
trunk/libseed/seed-engine.c
trunk/libseed/seed-structs.c
trunk/libseed/seed-structs.h
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Mon Nov 24 03:27:59 2008
@@ -666,18 +666,7 @@
found_field:
if (field)
{
- GArgument field_value;
- GITypeInfo *field_type = g_field_info_get_type(field);
- if (g_field_info_get_field(field, b, &field_value))
- {
- ret = seed_gi_argument_make_js(&field_value,
- field_type, exception);
-
- g_base_info_unref((GIBaseInfo *) info);
-
- g_free(cproperty_name);
- return ret;
- }
+ ret = seed_field_get_value(b, field, exception);
}
g_base_info_unref((GIBaseInfo *) info);
}
Modified: trunk/libseed/seed-structs.c
==============================================================================
--- trunk/libseed/seed-structs.c (original)
+++ trunk/libseed/seed-structs.c Mon Nov 24 03:27:59 2008
@@ -98,7 +98,7 @@
return 0;
}
-static JSValueRef
+JSValueRef
seed_field_get_value(gpointer object,
GIFieldInfo * field,
JSValueRef * exception)
Modified: trunk/libseed/seed-structs.h
==============================================================================
--- trunk/libseed/seed-structs.h (original)
+++ trunk/libseed/seed-structs.h Mon Nov 24 03:27:59 2008
@@ -29,6 +29,11 @@
JSObjectRef seed_make_pointer(gpointer pointer);
+JSValueRef
+seed_field_get_value(gpointer object,
+ GIFieldInfo * field,
+ JSValueRef * exception);
+
gpointer seed_pointer_get_pointer(JSValueRef strukt);
void seed_structs_init();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]