gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3863 - in GNUnet: . src/setup/lib


From: durner
Subject: [GNUnet-SVN] r3863 - in GNUnet: . src/setup/lib
Date: Sun, 3 Dec 2006 10:28:47 -0800 (PST)

Author: durner
Date: 2006-12-03 10:28:42 -0800 (Sun, 03 Dec 2006)
New Revision: 3863

Modified:
   GNUnet/configure.ac
   GNUnet/src/setup/lib/tree.c
Log:
use scm_init_guile()

Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2006-12-03 17:10:28 UTC (rev 3862)
+++ GNUnet/configure.ac 2006-12-03 18:28:42 UTC (rev 3863)
@@ -525,6 +525,9 @@
  AC_MSG_ERROR([GNUnet requires libguile 1.8])
 fi
 
+AC_CHECK_LIB([guile], [scm_init_guile], [],
+       AC_MSG_ERROR([Guile doesn't provide scm_init_guile(). Please report to 
address@hidden))
+
 AC_CONFIG_FILES([ po/Makefile.in m4/Makefile
 Makefile
 contrib/Makefile

Modified: GNUnet/src/setup/lib/tree.c
===================================================================
--- GNUnet/src/setup/lib/tree.c 2006-12-03 17:10:28 UTC (rev 3862)
+++ GNUnet/src/setup/lib/tree.c 2006-12-03 18:28:42 UTC (rev 3863)
@@ -350,8 +350,7 @@
           const char * specification) {
   struct GNS_Tree * ret;
 
-  ret = scm_with_guile(parse_internal,
-                      (void*) specification);
+  ret = parse_internal((void*) specification);
   if (ret != NULL)
     ret->type = GNS_Root;
   return ret;
@@ -388,34 +387,9 @@
   tc.vcl = vcl;
   tc.ctx = ctx;
   tc.root = root;
-  scm_with_guile(&notify_change_internal, &tc);
+  notify_change_internal(&tc);
 }
 
-static void * init_helper(void * unused) {
-  tc_tag = scm_make_smob_type ("tc", 0);
-  scm_set_smob_mark (tc_tag, NULL);
-  scm_set_smob_free (tc_tag, free_box);
-  scm_set_smob_print (tc_tag, print_tc);
-
-  tree_tag = scm_make_smob_type ("tc", sizeof (struct GNS_Tree));
-  scm_set_smob_mark (tree_tag, NULL);
-  scm_set_smob_free (tree_tag, free_box);
-  scm_set_smob_print (tree_tag, print_tree);
-  scm_c_define_gsubr("change-visible",
-                    4, 0, 0,
-                    &change_visible);
-  scm_c_define_gsubr("build-tree-node",
-                    8, 0, 0,
-                    &build_tree_node);
-  scm_c_define_gsubr("get-option",
-                    3, 0, 0,
-                    &get_option);
-  scm_c_define_gsubr("set-option",
-                    4, 0, 0,
-                    &set_option);
-  return NULL;
-}
-
 /**
  * Hopefully this initialization can be done
  * once and for all outside of a guile context.
@@ -447,11 +421,29 @@
   free(env);
 #endif
 
-  /* Guile doesn't get the stack boundaries right in our case.
-     This workaround ensures that Guile's garbage collector will never run. */
-  putenv("GUILE_INIT_MALLOC_LIMIT=100000000");
+       scm_init_guile();
 
-  scm_with_guile(&init_helper, NULL);
+  tc_tag = scm_make_smob_type ("tc", 0);
+  scm_set_smob_mark (tc_tag, NULL);
+  scm_set_smob_free (tc_tag, free_box);
+  scm_set_smob_print (tc_tag, print_tc);
+
+  tree_tag = scm_make_smob_type ("tc", sizeof (struct GNS_Tree));
+  scm_set_smob_mark (tree_tag, NULL);
+  scm_set_smob_free (tree_tag, free_box);
+  scm_set_smob_print (tree_tag, print_tree);
+  scm_c_define_gsubr("change-visible",
+                    4, 0, 0,
+                    &change_visible);
+  scm_c_define_gsubr("build-tree-node",
+                    8, 0, 0,
+                    &build_tree_node);
+  scm_c_define_gsubr("get-option",
+                    3, 0, 0,
+                    &get_option);
+  scm_c_define_gsubr("set-option",
+                    4, 0, 0,
+                    &set_option);
 }
 
 void __attribute__ ((destructor)) gns_scheme_fin() {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]