[seed] Patch from Matt:



commit d4e31e3d7d6dae85dca207877c43adf64b486a83
Author: Tim Horton <hortont424 gmail com>
Date:   Mon Mar 16 21:30:20 2009 -0400

    Patch from Matt:
    
    simple patch changing the api to take the : separated path. also fixed a
    huge mistake with memory leak if you set the path from the api
---
 libseed/seed-api.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libseed/seed-api.c b/libseed/seed-api.c
index dc25f1a..aed20d1 100644
--- a/libseed/seed-api.c
+++ b/libseed/seed-api.c
@@ -496,18 +496,18 @@ seed_value_is_function (JSContextRef ctx, JSObjectRef value)
 /**
  * seed_engine_set_search_path:
  * @eng: A #SeedEngine, on which to set the path.
- * @path: A #gchar**, a null-terminated array of strings containing path to set.
+ * @path: A #gchar*, a colon separated string containing the path to set
  *
  * Sets the default search path for Seed.include.
  *
  */
 void
-seed_engine_set_search_path (SeedEngine * eng, gchar ** path)
+seed_engine_set_search_path (SeedEngine * eng, gchar * path)
 {
   /* this should be null from seed_init unless there's already a path set. */
 
-  g_free (eng->search_path);
-  eng->search_path = g_strdupv (path);
+  g_strfreev (eng->search_path);
+  eng->search_path = g_strsplit (path, ":", -1);
 }
 
 /**



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