guile-cvs
[Top][All Lists]
Advanced

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

guile/guile-core/libguile values.c snarf.h scms...


From: Marius Vollmer
Subject: guile/guile-core/libguile values.c snarf.h scms...
Date: Sat, 19 May 2001 17:35:43 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/05/19 17:35:43

Modified files:
        guile-core/libguile: values.c snarf.h scmsigs.c rw.c rdelim.c 
                             ramap.c pairs.c macros.c goops.c gh_funcs.c 
                             gc.c eval.c 

Log message:
        (scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
        scm_c_define_gsubr_with_generic): New functions.  They replace
        scm_make_gsubr and scm_make_gsubr_with_generic.  The `make' variants
        only create the gsubr object, while the `define' variants also put it
        into the current module.  Changed all callers.  (scm_make_gsubr,
        scm_make_gsubr_with_generic): Deprecated.
        
        (scm_c_make_subr, scm_c_define_subr, scm_c_make_subr_with_generic,
        scm_c_define_subr_with_generic): New functions.  They replace
        scm_make_subr, scm_make_subr_opt and scm_make_subr_with_generic.  The
        `make' variants only create the subr object, while the `define'
        variants also put it into the current module.  Changed all callers.
        (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
        Deprecated.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/values.c.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/snarf.h.diff?cvsroot=OldCVS&tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/scmsigs.c.diff?cvsroot=OldCVS&tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/rw.c.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/rdelim.c.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ramap.c.diff?cvsroot=OldCVS&tr1=1.69&tr2=1.70&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/pairs.c.diff?cvsroot=OldCVS&tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/macros.c.diff?cvsroot=OldCVS&tr1=1.28&tr2=1.29&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/goops.c.diff?cvsroot=OldCVS&tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/gh_funcs.c.diff?cvsroot=OldCVS&tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/gc.c.diff?cvsroot=OldCVS&tr1=1.197&tr2=1.198&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/eval.c.diff?cvsroot=OldCVS&tr1=1.220&tr2=1.221&r1=text&r2=text

Patches:
Index: guile/guile-core/libguile/eval.c
diff -u guile/guile-core/libguile/eval.c:1.220 
guile/guile-core/libguile/eval.c:1.221
--- guile/guile-core/libguile/eval.c:1.220      Tue May 15 07:57:21 2001
+++ guile/guile-core/libguile/eval.c    Sat May 19 17:35:43 2001
@@ -4098,7 +4098,7 @@
   SCM_SETCDR (scm_undefineds, scm_undefineds);
   scm_listofnull = scm_cons (SCM_EOL, SCM_EOL);
 
-  scm_f_apply = scm_make_subr ("apply", scm_tc7_lsubr_2, scm_apply);
+  scm_f_apply = scm_c_define_subr ("apply", scm_tc7_lsubr_2, scm_apply);
 
   /* acros */
   /* end of acros */
Index: guile/guile-core/libguile/gc.c
diff -u guile/guile-core/libguile/gc.c:1.197 
guile/guile-core/libguile/gc.c:1.198
--- guile/guile-core/libguile/gc.c:1.197        Tue May 15 07:57:21 2001
+++ guile/guile-core/libguile/gc.c      Sat May 19 17:35:43 2001
@@ -2671,7 +2671,8 @@
   /* Dirk:FIXME:: scm_create_hook is strange. */
   scm_after_gc_hook = scm_create_hook ("after-gc-hook", 0);
 
-  after_gc_thunk = scm_make_subr_opt ("%gc-thunk", scm_tc7_subr_0, 
gc_async_thunk, 0);
+  after_gc_thunk = scm_c_make_subr ("%gc-thunk", scm_tc7_subr_0,
+                                   gc_async_thunk);
   gc_async = scm_system_async (after_gc_thunk);  /* protected via scm_asyncs */
 
   scm_c_hook_add (&scm_after_gc_c_hook, mark_gc_async, NULL, 0);
Index: guile/guile-core/libguile/gh_funcs.c
diff -u guile/guile-core/libguile/gh_funcs.c:1.9 
guile/guile-core/libguile/gh_funcs.c:1.10
--- guile/guile-core/libguile/gh_funcs.c:1.9    Tue May 15 07:57:21 2001
+++ guile/guile-core/libguile/gh_funcs.c        Sat May 19 17:35:43 2001
@@ -50,8 +50,8 @@
 gh_new_procedure (const char *proc_name, SCM (*fn) (),
                  int n_required_args, int n_optional_args, int varp)
 {
-  return scm_make_gsubr (proc_name, n_required_args, n_optional_args,
-                        varp, fn);
+  return scm_c_define_gsubr (proc_name, n_required_args, n_optional_args,
+                            varp, fn);
 }
 
 SCM
Index: guile/guile-core/libguile/goops.c
diff -u guile/guile-core/libguile/goops.c:1.30 
guile/guile-core/libguile/goops.c:1.31
--- guile/guile-core/libguile/goops.c:1.30      Fri May 18 17:33:25 2001
+++ guile/guile-core/libguile/goops.c   Sat May 19 17:35:42 2001
@@ -1862,7 +1862,7 @@
 #undef FUNC_NAME
 
 SCM_SYMBOL (sym_compute_applicable_methods, "compute-applicable-methods");
-SCM_VARIABLE_INIT (var_compute_applicable_methods, 
"compute-applicable-methods", scm_make_gsubr (s_sys_compute_applicable_methods, 
2, 0, 0, scm_sys_compute_applicable_methods));
+SCM_VARIABLE_INIT (var_compute_applicable_methods, 
"compute-applicable-methods", scm_c_define_gsubr 
(s_sys_compute_applicable_methods, 2, 0, 0, 
scm_sys_compute_applicable_methods));
 
 SCM_SYNTAX (s_atslot_ref, "@slot-ref", scm_makmmacro, scm_m_atslot_ref);
 
@@ -2511,9 +2511,9 @@
              char *accessor_name)
 {
   {
-    SCM get = scm_make_subr_opt ("goops:get", scm_tc7_subr_1, getter, 0);
-    SCM set = scm_make_subr_opt ("goops:set", scm_tc7_subr_2,
-                                setter ? setter : default_setter, 0);
+    SCM get = scm_c_make_subr ("goops:get", scm_tc7_subr_1, getter);
+    SCM set = scm_c_make_subr ("goops:set", scm_tc7_subr_2,
+                              setter ? setter : default_setter);
     SCM getm = scm_closure (SCM_LIST2 (SCM_LIST1 (sym_o),
                                       SCM_LIST2 (get, sym_o)),
                            SCM_EOL);
@@ -2693,7 +2693,8 @@
 void
 scm_init_goops ()
 {
-  scm_make_gsubr ("%init-goops-builtins", 0, 0, 0, scm_init_goops_builtins);
+  scm_c_define_gsubr ("%init-goops-builtins", 0, 0, 0,
+                     scm_init_goops_builtins);
 }
 
 /*
Index: guile/guile-core/libguile/macros.c
diff -u guile/guile-core/libguile/macros.c:1.28 
guile/guile-core/libguile/macros.c:1.29
--- guile/guile-core/libguile/macros.c:1.28     Tue May 15 07:57:21 2001
+++ guile/guile-core/libguile/macros.c  Sat May 19 17:35:42 2001
@@ -221,7 +221,7 @@
 scm_make_synt (const char *name, SCM (*macroizer) (), SCM (*fcn)() )
 {
   SCM var = scm_c_define (name, SCM_UNDEFINED);
-  SCM transformer = scm_make_subr_opt (name, scm_tc7_subr_2, fcn, 0);
+  SCM transformer = scm_c_make_subr (name, scm_tc7_subr_2, fcn);
   SCM_VARIABLE_SET (var, macroizer (transformer));
   return SCM_UNSPECIFIED;
 }
Index: guile/guile-core/libguile/pairs.c
diff -u guile/guile-core/libguile/pairs.c:1.21 
guile/guile-core/libguile/pairs.c:1.22
--- guile/guile-core/libguile/pairs.c:1.21      Tue Apr  3 06:19:04 2001
+++ guile/guile-core/libguile/pairs.c   Sat May 19 17:35:42 2001
@@ -169,7 +169,7 @@
   unsigned int subnr = 0;
 
   for (subnr = 0; cxrs [subnr]; subnr++)
-    scm_make_subr(cxrs [subnr], scm_tc7_cxr, NULL);
+    scm_c_define_subr (cxrs [subnr], scm_tc7_cxr, NULL);
 
 #ifndef SCM_MAGIC_SNARFER
 #include "libguile/pairs.x"
Index: guile/guile-core/libguile/ramap.c
diff -u guile/guile-core/libguile/ramap.c:1.69 
guile/guile-core/libguile/ramap.c:1.70
--- guile/guile-core/libguile/ramap.c:1.69      Tue May 15 07:57:21 2001
+++ guile/guile-core/libguile/ramap.c   Sat May 19 17:35:42 2001
@@ -2064,7 +2064,7 @@
 {
   init_raprocs (ra_rpsubrs);
   init_raprocs (ra_asubrs);
-  scm_make_subr (s_array_equal_p, scm_tc7_rpsubr, scm_array_equal_p);
+  scm_c_define_subr (s_array_equal_p, scm_tc7_rpsubr, scm_array_equal_p);
   scm_smobs[SCM_TC2SMOBNUM (scm_tc16_array)].equalp = scm_raequal;
 #ifndef SCM_MAGIC_SNARFER
 #include "libguile/ramap.x"
Index: guile/guile-core/libguile/rdelim.c
diff -u guile/guile-core/libguile/rdelim.c:1.5 
guile/guile-core/libguile/rdelim.c:1.6
--- guile/guile-core/libguile/rdelim.c:1.5      Fri May 18 17:27:22 2001
+++ guile/guile-core/libguile/rdelim.c  Sat May 19 17:35:42 2001
@@ -307,7 +307,8 @@
 void
 scm_init_rdelim (void)
 {
-  scm_make_gsubr ("%init-rdelim-builtins", 0, 0, 0, scm_init_rdelim_builtins);
+  scm_c_define_gsubr ("%init-rdelim-builtins", 0, 0, 0,
+                     scm_init_rdelim_builtins);
 }
 
 /*
Index: guile/guile-core/libguile/rw.c
diff -u guile/guile-core/libguile/rw.c:1.3 guile/guile-core/libguile/rw.c:1.4
--- guile/guile-core/libguile/rw.c:1.3  Fri May 18 17:24:15 2001
+++ guile/guile-core/libguile/rw.c      Sat May 19 17:35:42 2001
@@ -173,7 +173,7 @@
 void
 scm_init_rw ()
 {
-  scm_make_gsubr ("%init-rw-builtins", 0, 0, 0, scm_init_rw_builtins);
+  scm_c_define_gsubr ("%init-rw-builtins", 0, 0, 0, scm_init_rw_builtins);
 }
 
 /*
Index: guile/guile-core/libguile/scmsigs.c
diff -u guile/guile-core/libguile/scmsigs.c:1.57 
guile/guile-core/libguile/scmsigs.c:1.58
--- guile/guile-core/libguile/scmsigs.c:1.57    Tue May 15 07:57:20 2001
+++ guile/guile-core/libguile/scmsigs.c Sat May 19 17:35:42 2001
@@ -494,8 +494,9 @@
   signal_handlers =
     SCM_VARIABLE_LOC (scm_c_define ("signal-handlers",
                                  scm_c_make_vector (NSIG, SCM_BOOL_F)));
-  thunk = scm_make_gsubr ("%deliver-signals", 0, 0, 0,
-                         sys_deliver_signals);
+  /* XXX - use scm_c_make_gsubr here instead of `define'? */
+  thunk = scm_c_define_gsubr ("%deliver-signals", 0, 0, 0,
+                             sys_deliver_signals);
   signal_async = scm_system_async (thunk);
 
   for (i = 0; i < NSIG; i++)
Index: guile/guile-core/libguile/snarf.h
diff -u guile/guile-core/libguile/snarf.h:1.45 
guile/guile-core/libguile/snarf.h:1.46
--- guile/guile-core/libguile/snarf.h:1.45      Tue May 15 07:57:20 2001
+++ guile/guile-core/libguile/snarf.h   Sat May 19 17:35:42 2001
@@ -92,8 +92,8 @@
 SCM FNAME ARGLIST\
 )\
 SCM_SNARF_INIT(\
-scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, \
-                (SCM_FUNC_CAST_ARBITRARY_ARGS) FNAME); \
+scm_c_define_gsubr (s_ ## FNAME, REQ, OPT, VAR, \
+                    (SCM_FUNC_CAST_ARBITRARY_ARGS) FNAME); \
 )\
 SCM_SNARF_DOCS(\
 SCM_SNARF_DOC_STARTP PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | 
\
@@ -105,7 +105,7 @@
 static const char s_ ## FNAME [] = PRIMNAME; \
 SCM FNAME ARGLIST\
 )\
-SCM_SNARF_INIT(scm_make_subr (s_ ## FNAME, TYPE, FNAME); ) \
+SCM_SNARF_INIT(scm_c_define_subr (s_ ## FNAME, TYPE, FNAME); ) \
 SCM_SNARF_DOCS(\
 SCM_SNARF_DOC_START1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | \
  SCM_SNARF_DOCSTRING_START DOCSTRING SCM_SNARF_DOCSTRING_END \
@@ -113,13 +113,13 @@
 
 #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN)  \
 SCM_SNARF_HERE(static const char RANAME[]=STR) \
-SCM_SNARF_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, \
-                               (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN))
+SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \
+                                   (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN))
 
 #define SCM_REGISTER_PROC(RANAME, STR, REQ, OPT, VAR, CFN)  \
 SCM_SNARF_HERE(static const char RANAME[]=STR) \
-SCM_SNARF_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, \
-                               (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN);) \
+SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \
+                                   (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN);) \
 SCM_SNARF_DOCS(\
 SCM_SNARF_DOC_STARTR STR | REQ | OPT | VAR | __FILE__:__LINE__ | \
  SCM_SNARF_DOCSTRING_START CFN SCM_SNARF_DOCSTRING_END \
@@ -131,14 +131,14 @@
 static SCM GF \
 )SCM_SNARF_INIT(\
 GF = SCM_PACK (0);  /* Dirk:FIXME:: Can we safely use #f instead of 0? */ \
-scm_make_gsubr_with_generic (RANAME, REQ, OPT, VAR, \
-                             (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN, &GF) \
+scm_c_define_gsubr_with_generic (RANAME, REQ, OPT, VAR, \
+                                 (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN, &GF) \
 )
 
 #define SCM_PROC1(RANAME, STR, TYPE, CFN) \
 SCM_SNARF_HERE(static const char RANAME[]=STR) \
 SCM_SNARF_INIT(\
-scm_make_subr (RANAME, TYPE, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN) \
+scm_c_define_subr (RANAME, TYPE, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN) \
 )
 
 
@@ -148,8 +148,8 @@
 static SCM GF \
 )SCM_SNARF_INIT(\
 GF = SCM_PACK (0);  /* Dirk:FIXME:: Can we safely use #f instead of 0? */ \
-scm_make_subr_with_generic (RANAME, TYPE, \
-                            (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN, &GF) \
+scm_c_define_subr_with_generic (RANAME, TYPE, \
+                                (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN, &GF) \
 )
 
 #define SCM_SYNTAX(RANAME, STR, TYPE, CFN)  \
Index: guile/guile-core/libguile/values.c
diff -u guile/guile-core/libguile/values.c:1.4 
guile/guile-core/libguile/values.c:1.5
--- guile/guile-core/libguile/values.c:1.4      Mon May 14 17:52:20 2001
+++ guile/guile-core/libguile/values.c  Sat May 19 17:35:42 2001
@@ -96,7 +96,8 @@
 void
 scm_init_values (void)
 {
-  SCM print = scm_make_subr ("%print-values", scm_tc7_subr_2, print_values);
+  SCM print = scm_c_define_subr ("%print-values", scm_tc7_subr_2,
+                                print_values);
 
   scm_values_vtable 
     = scm_permanent_object (scm_make_vtable_vtable (scm_makfrom0str ("pr"),



reply via email to

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