seed r650 - in trunk: extensions libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r650 - in trunk: extensions libseed
- Date: Mon, 5 Jan 2009 05:10:41 +0000 (UTC)
Author: racarr
Date: Mon Jan 5 05:10:41 2009
New Revision: 650
URL: http://svn.gnome.org/viewvc/seed?rev=650&view=rev
Log:
Simple evaluation API.
Modified:
trunk/extensions/GObject.js
trunk/libseed/seed-api.c
trunk/libseed/seed.h
Modified: trunk/extensions/GObject.js
==============================================================================
--- trunk/extensions/GObject.js (original)
+++ trunk/extensions/GObject.js Mon Jan 5 05:10:41 2009
@@ -23,7 +23,6 @@
for (var i = 0; i < types.length; i++)
{
-
GObject["TYPE_"+types[i].name] = types[i].fundamental << 2;
}
Modified: trunk/libseed/seed-api.c
==============================================================================
--- trunk/libseed/seed-api.c (original)
+++ trunk/libseed/seed-api.c Mon Jan 5 05:10:41 2009
@@ -105,6 +105,17 @@
return ret;
}
+JSValueRef seed_simple_evaluate(JSContextRef ctx, gchar * source)
+{
+ JSValueRef ret;
+ JSStringRef script = JSStringCreateWithUTF8CString(source);
+
+ ret = JSEvaluateScript(ctx, script, NULL, NULL, 0, NULL);
+
+ JSStringRelease(script);
+ return ret;
+}
+
JSValueRef seed_script_exception(SeedScript * s)
{
return s->exception;
Modified: trunk/libseed/seed.h
==============================================================================
--- trunk/libseed/seed.h (original)
+++ trunk/libseed/seed.h Mon Jan 5 05:10:41 2009
@@ -68,6 +68,7 @@
* seed-engine.c
*/
SeedEngine *seed_init(gint * argc, gchar *** argv);
+SeedValue seed_simple_evaluate(SeedContext ctx, gchar * source);
SeedScript *seed_make_script(SeedContext ctx,
const gchar * s, const gchar * source_url,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]