wingo pushed a commit to branch master
in repository guile.
commit 623559f31197a512a4ae52924d31dcedf856e268
Author: Andy Wingo <[email protected]>
Date: Tue Jan 6 11:50:16 2015 -0500
Deprecate scm_no_applicable_method C export
* libguile/deprecated.c (scm_init_deprecated_goops)
(scm_no_applicable_method):
* libguile/goops.h:
* libguile/goops.c (scm_no_applicable_method)
(scm_sys_goops_early_init): Deprecate scm_no_applicable_method C
export.
---
libguile/deprecated.c | 9 +++++++++
libguile/deprecated.h | 4 ++++
libguile/goops.c | 9 +++++----
libguile/goops.h | 2 --
4 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 5f4b5c7..2358b42 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -93,6 +93,15 @@ scm_memory_error (const char *subr)
+SCM scm_no_applicable_method = SCM_BOOL_F;
+
+void
+scm_init_deprecated_goops (void)
+{
+ scm_no_applicable_method =
+ scm_variable_ref (scm_c_lookup ("no-applicable-method"));
+}
+
#define BUFFSIZE 32 /* big enough for most uses */
#define SPEC_OF(x) SCM_SLOT (x, scm_si_specializers)
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 472dda3..1c6a1e8 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -150,6 +150,10 @@ SCM_DEPRECATED void scm_memory_error (const char *subr)
SCM_NORETURN;
+SCM_DEPRECATED SCM scm_no_applicable_method;
+
+SCM_INTERNAL void scm_init_deprecated_goops (void);
+
SCM_DEPRECATED SCM scm_compute_applicable_methods (SCM gf, SCM args, long len,
int scm_find_method);
SCM_DEPRECATED SCM scm_find_method (SCM l);
SCM_DEPRECATED SCM scm_basic_make_class (SCM c, SCM name, SCM dsupers, SCM
dslots);
diff --git a/libguile/goops.c b/libguile/goops.c
index f8082d1..b9389f9 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -172,8 +172,6 @@ SCM scm_port_class[3 * SCM_I_MAX_PORT_TYPE_COUNT];
/* SMOB classes. */
SCM scm_smob_class[SCM_I_MAX_SMOB_TYPE_COUNT];
-SCM scm_no_applicable_method;
-
static SCM scm_make_unbound (void);
static SCM scm_unbound_p (SCM obj);
static SCM scm_assert_bound (SCM value, SCM obj);
@@ -1739,8 +1737,6 @@ SCM_DEFINE (scm_sys_goops_early_init,
"%goops-early-init", 0, 0, 0,
create_struct_classes ();
create_port_classes ();
- scm_no_applicable_method = scm_variable_ref (scm_c_lookup
("no-applicable-method"));
-
return SCM_UNSPECIFIED;
}
#undef FUNC_NAME
@@ -1761,6 +1757,11 @@ SCM_DEFINE (scm_sys_goops_loaded, "%goops-loaded", 0, 0,
0,
var_change_class =
scm_module_variable (scm_module_goops, sym_change_class);
setup_extended_primitive_generics ();
+
+#if (SCM_ENABLE_DEPRECATED == 1)
+ scm_init_deprecated_goops ();
+#endif
+
return SCM_UNSPECIFIED;
}
#undef FUNC_NAME
diff --git a/libguile/goops.h b/libguile/goops.h
index d145cb4..7633029 100644
--- a/libguile/goops.h
+++ b/libguile/goops.h
@@ -214,8 +214,6 @@ SCM_API SCM scm_class_float;
SCM_API SCM scm_class_double;
SCM_API const char *scm_s_slot_set_x;
-SCM_API SCM scm_no_applicable_method;
-
SCM_API SCM scm_module_goops;
SCM_API SCM scm_goops_version (void);