[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 12/87: Deprecate scm_basic_make_class
From: |
Andy Wingo |
Subject: |
[Guile-commits] 12/87: Deprecate scm_basic_make_class |
Date: |
Thu, 22 Jan 2015 17:29:44 +0000 |
wingo pushed a commit to branch wip-goops-refactor
in repository guile.
commit 2fad8e51b98cb50d9e69fc125725a89bb36890e6
Author: Andy Wingo <address@hidden>
Date: Sun Jan 4 13:43:14 2015 -0500
Deprecate scm_basic_make_class
* libguile/deprecated.h:
* libguile/deprecated.c (scm_basic_make_class): Deprecate.
* libguile/goops.c:
* libguile/goops.h (scm_make_standard_class): New internal helper. It's
a better spelling, as it matches make-standard-class, and is internal
so as not to cause confusion between boot GOOPS helpers and "real"
GOOPS interfaces.
---
libguile/deprecated.c | 13 ++++++++++++-
libguile/deprecated.h | 3 ++-
libguile/goops.c | 8 ++++----
libguile/goops.h | 3 ++-
4 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 8989d30..5f4b5c7 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -2,7 +2,7 @@
deprecate something, move it here when that is feasible.
*/
-/* Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2014
Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -319,6 +319,17 @@ scm_find_method (SCM l)
}
#undef FUNC_NAME
+SCM
+scm_basic_make_class (SCM meta, SCM name, SCM dsupers, SCM dslots)
+{
+ scm_c_issue_deprecation_warning
+ ("scm_basic_make_class is deprecated. Use `define-class' in Scheme,"
+ "or use `(make META #:name NAME #:dsupers DSUPERS #:slots DSLOTS)' "
+ "in Scheme.");
+
+ return scm_make_standard_class (meta, name, dsupers, dslots);
+}
+
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 122687a..472dda3 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -5,7 +5,7 @@
#ifndef SCM_DEPRECATED_H
#define SCM_DEPRECATED_H
-/* Copyright (C) 2003,2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013,
2014 Free Software Foundation, Inc.
+/* Copyright (C) 2003,2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013,
2014, 2015 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -152,6 +152,7 @@ SCM_DEPRECATED void scm_memory_error (const char *subr)
SCM_NORETURN;
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 9e9a514..f8f6c46 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -516,10 +516,10 @@ prep_hashsets (SCM class)
/******************************************************************************/
SCM
-scm_basic_make_class (SCM class, SCM name, SCM dsupers, SCM dslots)
+scm_make_standard_class (SCM meta, SCM name, SCM dsupers, SCM dslots)
{
return scm_call_4 (scm_variable_ref (var_make_standard_class),
- class, name, dsupers, dslots);
+ meta, name, dsupers, dslots);
}
/******************************************************************************/
@@ -1594,7 +1594,7 @@ make_class_from_template (char const *template, char
const *type_name, SCM super
meta = applicablep ? scm_class_procedure_class : scm_class_class;
- return scm_basic_make_class (meta, name, supers, SCM_EOL);
+ return scm_make_standard_class (meta, name, supers, SCM_EOL);
}
static SCM
@@ -1614,7 +1614,7 @@ make_class_from_symbol (SCM type_name_sym, SCM supers,
int applicablep)
meta = applicablep ? scm_class_procedure_class : scm_class_class;
- return scm_basic_make_class (meta, name, supers, SCM_EOL);
+ return scm_make_standard_class (meta, name, supers, SCM_EOL);
}
SCM
diff --git a/libguile/goops.h b/libguile/goops.h
index a9b9921..59cc4d0 100644
--- a/libguile/goops.h
+++ b/libguile/goops.h
@@ -235,7 +235,8 @@ SCM_API SCM scm_class_of (SCM obj);
/* Low level functions exported */
SCM_API SCM scm_make_next_method (SCM methods, SCM args, SCM gf);
-SCM_API SCM scm_basic_make_class (SCM c, SCM name, SCM dsupers, SCM dslots);
+SCM_INTERNAL SCM scm_make_standard_class (SCM meta, SCM name, SCM dsupers,
+ SCM dslots);
/* Primitives exported */
SCM_API SCM scm_sys_allocate_instance (SCM c, SCM initargs);
- [Guile-commits] branch wip-goops-refactor updated (c89d0c5 -> def60ff), Andy Wingo, 2015/01/22
- [Guile-commits] 01/87: %compute-applicable-methods in Scheme, Andy Wingo, 2015/01/22
- [Guile-commits] 05/87: More useless goops.c code removal, Andy Wingo, 2015/01/22
- [Guile-commits] 07/87: %init-goops-builtins is an extension, not a global, Andy Wingo, 2015/01/22
- [Guile-commits] 03/87: Rewrite %method-more-specific? to be in Scheme, Andy Wingo, 2015/01/22
- [Guile-commits] 10/87: Remove declarations without definitions, Andy Wingo, 2015/01/22
- [Guile-commits] 08/87: Preparation for more GOOPS refactorings, Andy Wingo, 2015/01/22
- [Guile-commits] 09/87: Remove unused %fast-slot-ref / %fast-slot-set! from GOOPS, Andy Wingo, 2015/01/22
- [Guile-commits] 02/87: Deprecate C interfaces scm_compute_applicable_methods, scm_find_method, Andy Wingo, 2015/01/22
- [Guile-commits] 12/87: Deprecate scm_basic_make_class,
Andy Wingo <=
- [Guile-commits] 04/87: Remove unused macros in goops.c, Andy Wingo, 2015/01/22
- [Guile-commits] 06/87: compute-cpl implementation only in Scheme, Andy Wingo, 2015/01/22
- [Guile-commits] 13/87: `class' is a hygienic macro, Andy Wingo, 2015/01/22
- [Guile-commits] 14/87: define-generic, define-extended-generic are hygienic syntax, Andy Wingo, 2015/01/22
- [Guile-commits] 15/87: Remove unused *goops-module* definition., Andy Wingo, 2015/01/22
- [Guile-commits] 17/87: Remove unused scm_t_method and SCM_METHOD, Andy Wingo, 2015/01/22
- [Guile-commits] 20/87: Remove useless scm_s_slot_set_x export, Andy Wingo, 2015/01/22
- [Guile-commits] 18/87: Deprecate scm_no_applicable_method C export, Andy Wingo, 2015/01/22
- [Guile-commits] 21/87: Remove unused `default-slot-definition-class' <class> slot, Andy Wingo, 2015/01/22
- [Guile-commits] 22/87: Remove unused CPP defines naming <method> slots, Andy Wingo, 2015/01/22