foreign.h presents a more pointer-centric interface
[bpt/guile.git] / libguile / gsubr.c
index f0c6222..de4bff6 100644 (file)
@@ -794,13 +794,13 @@ create_gsubr (int define, const char *name,
   sname = scm_from_locale_symbol (name);
   table = scm_c_make_vector (generic_loc ? 3 : 2, SCM_UNDEFINED);
   SCM_SIMPLE_VECTOR_SET (table, 0,
-                         scm_c_from_foreign (SCM_FOREIGN_TYPE_POINTER,
-                                             &fcn, 0, NULL));
+                         scm_take_foreign_pointer (SCM_FOREIGN_TYPE_VOID,
+                                                   fcn, 0, NULL));
   SCM_SIMPLE_VECTOR_SET (table, 1, sname);
   if (generic_loc)
     SCM_SIMPLE_VECTOR_SET (table, 2,
-                           scm_c_from_foreign (SCM_FOREIGN_TYPE_POINTER,
-                                               &generic_loc, 0, NULL));
+                           scm_take_foreign_pointer (SCM_FOREIGN_TYPE_VOID,
+                                                     generic_loc, 0, NULL));
 
   /* make program */
   ret = scm_make_program (scm_subr_objcode_trampoline (nreq, nopt, rest),