seed r90 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r90 - trunk/libseed
- Date: Mon, 3 Nov 2008 12:13:24 +0000 (UTC)
Author: racarr
Date: Mon Nov 3 12:13:24 2008
New Revision: 90
URL: http://svn.gnome.org/viewvc/seed?rev=90&view=rev
Log:
Add Seed.fork.
Modified:
trunk/libseed/seed-builtins.c
trunk/libseed/seed-engine.c
Modified: trunk/libseed/seed-builtins.c
==============================================================================
--- trunk/libseed/seed-builtins.c (original)
+++ trunk/libseed/seed-builtins.c Mon Nov 3 12:13:24 2008
@@ -262,6 +262,20 @@
return JSValueMakeNull(eng->context);
}
+JSValueRef
+seed_fork(JSContextRef ctx,
+ JSObjectRef function,
+ JSObjectRef this_object,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef * exception)
+{
+ pid_t child;
+
+ child = fork();
+ return seed_value_from_int(child);
+}
+
void seed_init_builtins(int * argc, char *** argv)
{
int i;
@@ -275,6 +289,7 @@
seed_create_function("prototype", &seed_prototype, obj);
seed_create_function("check_syntax", &seed_check_syntax, obj);
seed_create_function("introspect", &seed_introspect, obj);
+ seed_create_function("fork", &seed_fork, obj);
arrayObj = JSObjectMake(eng->context, NULL, NULL);
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Mon Nov 3 12:13:24 2008
@@ -753,15 +753,15 @@
struct_ref = JSObjectMake(eng->context, 0, 0);
n_methods =
- g_struct_info_get_n_methods((GIStructInfo *)info);
+ g_struct_info_get_n_methods((GIStructInfo *)info);
+
for (i = 0; i < n_methods; i++)
{
finfo =
- g_struct_info_get_method(
- (GIStructInfo*)info, i);
- seed_gobject_define_property_from_function_info(finfo,
- struct_ref,
- FALSE);
+ g_struct_info_get_method(
+ (GIStructInfo*)info, i);
+ seed_gobject_define_property_from_function_info
+ (finfo,struct_ref,FALSE);
}
@@ -772,8 +772,6 @@
JSValueProtect(eng->context,
(JSValueRef)struct_ref);
}
-
-
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]