[seed] [libseed] Add seed_context_create, which just wraps JSGarbageCollect



commit 641d154b48c23971093625041a0e8eb329bde7b9
Author: Tim Horton <hortont424 gmail com>
Date:   Thu Aug 13 22:01:41 2009 -0400

    [libseed] Add seed_context_create, which just wraps JSGarbageCollect

 doc/reference/seed-sections.txt      |    1 +
 doc/reference/tmpl/seed-context.sgml |    8 ++++++++
 libseed/seed-api.c                   |   15 +++++++++++++++
 libseed/seed.h                       |    1 +
 4 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/doc/reference/seed-sections.txt b/doc/reference/seed-sections.txt
index 98fcb25..b5817cb 100644
--- a/doc/reference/seed-sections.txt
+++ b/doc/reference/seed-sections.txt
@@ -19,6 +19,7 @@ SeedContextGroup
 seed_context_create
 seed_context_ref
 seed_context_unref
+seed_context_collect
 seed_context_get_global_object
 seed_prepare_global_context
 seed_importer_add_global
diff --git a/doc/reference/tmpl/seed-context.sgml b/doc/reference/tmpl/seed-context.sgml
index 9f5f62a..4547410 100644
--- a/doc/reference/tmpl/seed-context.sgml
+++ b/doc/reference/tmpl/seed-context.sgml
@@ -76,6 +76,14 @@ script = seed_make_script(ctx, "print(imports)", NULL, 0);
 @ctx: 
 
 
+<!-- ##### FUNCTION seed_context_collect ##### -->
+<para>
+
+</para>
+
+ ctx: 
+
+
 <!-- ##### FUNCTION seed_context_get_global_object ##### -->
 <para>
 
diff --git a/libseed/seed-api.c b/libseed/seed-api.c
index dfcaf35..00b1c8b 100644
--- a/libseed/seed-api.c
+++ b/libseed/seed-api.c
@@ -103,6 +103,21 @@ seed_context_unref (JSGlobalContextRef ctx)
 }
 
 /**
+ * seed_context_collect:
+ * @ctx: A #SeedContext.
+ *
+ * Instructs JavaScriptCore to make a garbage collection pass.
+ * The context parameter is currently unused, and a pass is made
+ * through all contexts.
+ *
+ */
+void
+seed_context_collect (JSGlobalContextRef ctx)
+{
+  JSGarbageCollect(ctx);
+}
+
+/**
  * seed_make_object:
  * @ctx: The #SeedContext in which to create the new object.
  * @class: The #SeedClass to use to create the new object, or %NULL to use the
diff --git a/libseed/seed.h b/libseed/seed.h
index ab5099d..e48d1a2 100644
--- a/libseed/seed.h
+++ b/libseed/seed.h
@@ -105,6 +105,7 @@ SeedGlobalContext seed_context_create (SeedContextGroup group,
 				       SeedClass global_class);
 SeedGlobalContext seed_context_ref (SeedGlobalContext ctx);
 void seed_context_unref (SeedGlobalContext ctx);
+void seed_context_collect (SeedGlobalContext ctx);
 
 SeedObject seed_context_get_global_object (SeedContext ctx);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]