foreign.h presents a more pointer-centric interface
[bpt/guile.git] / libguile / snarf.h
index 717c953..98f6601 100644 (file)
@@ -105,10 +105,8 @@ SCM_SYMBOL (scm_i_paste (FNAME, __name), PRIMNAME);                        \
 SCM_SNARF_HERE(                                                                \
   static const char scm_i_paste (s_, FNAME) [] = PRIMNAME;             \
   SCM_API SCM FNAME ARGLIST;                                           \
-  static const scm_t_bits scm_i_paste (FNAME, __subr_ptr) =             \
-    (scm_t_bits) &FNAME; /* the subr */                                 \
   SCM_IMMUTABLE_FOREIGN (scm_i_paste (FNAME, __subr_foreign),           \
-                         scm_i_paste (FNAME, __subr_ptr));              \
+                         (scm_t_bits) &FNAME); /* the subr */           \
   SCM_STATIC_SUBR_OBJVECT (scm_i_paste (FNAME, __raw_objtable),         \
                            /* FIXME: directly be the foreign */         \
                            SCM_BOOL_F);                                 \
@@ -363,10 +361,10 @@ SCM_SNARF_INIT(scm_set_smob_apply((tag), (c_name), (req), (opt), (rest));)
                             (scm_t_bits) 0,                            \
                             (scm_t_bits) sizeof (contents) - 1)
 
-#define SCM_IMMUTABLE_FOREIGN(c_name, loc)              \
+#define SCM_IMMUTABLE_FOREIGN(c_name, ptr)                              \
   SCM_IMMUTABLE_CELL (c_name,                                           \
-                      scm_tc7_foreign | (SCM_FOREIGN_TYPE_POINTER << 8), \
-                      &loc)
+                      scm_tc7_foreign | (SCM_FOREIGN_TYPE_VOID << 8),   \
+                      ptr)
 
 /* for primitive-generics, add a foreign to the end */
 #define SCM_STATIC_SUBR_OBJVECT(c_name, foreign)                        \