seed r330 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r330 - trunk/libseed
- Date: Mon, 24 Nov 2008 07:16:23 +0000 (UTC)
Author: racarr
Date: Mon Nov 24 07:16:23 2008
New Revision: 330
URL: http://svn.gnome.org/viewvc/seed?rev=330&view=rev
Log:
Add conversion logic for object->struct. Allows nested structs to be specified as literals... in say constructors or function arguments. i.e. struct = new Namespace.Struct({color: {red: 20, blue: 30}}).
Modified:
trunk/libseed/seed-types.c
Modified: trunk/libseed/seed-types.c
==============================================================================
--- trunk/libseed/seed-types.c (original)
+++ trunk/libseed/seed-types.c Mon Nov 24 07:16:23 2008
@@ -317,6 +317,13 @@
seed_make_gclosure((JSObjectRef) value, 0);
}
}
+ else
+ {
+ JSObjectRef strukt =
+ seed_construct_struct_type_with_parameters(
+ interface, (JSObjectRef)value, exception);
+ arg->v_pointer = seed_pointer_get_pointer(strukt);
+ }
}
g_base_info_unref(interface);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]