guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 06/08: Remove special cases for <keyword>


From: Andy Wingo
Subject: [Guile-commits] 06/08: Remove special cases for <keyword>
Date: Sun, 11 Jan 2015 21:24:00 +0000

wingo pushed a commit to branch wip-goops-refactor
in repository guile.

commit c89ac6c10603d8660a03665c839a605fb433592f
Author: Andy Wingo <address@hidden>
Date:   Sun Jan 11 21:46:39 2015 +0100

    Remove special cases for <keyword>
    
    * libguile/goops.c (create_smob_classes, class_keyword)
      (scm_sys_goops_early_init): Remove special case for <keyword>.  It's a
      smob type, so the generic case works.
    
    * libguile/deprecated.c (scm_init_deprecated_goops): Load
      scm_class_keyword from SMOB class table.
    
    * module/oop/goops.scm (<keyword>): Remove special definition.
---
 libguile/deprecated.c |    2 +-
 libguile/goops.c      |    4 ----
 module/oop/goops.scm  |    1 -
 3 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 4a82e4f..06571b7 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -183,7 +183,7 @@ scm_init_deprecated_goops (void)
   scm_class_real = scm_variable_ref (scm_c_lookup ("<real>"));
   scm_class_integer = scm_variable_ref (scm_c_lookup ("<integer>"));
   scm_class_fraction = scm_variable_ref (scm_c_lookup ("<fraction>"));
-  scm_class_keyword = scm_variable_ref (scm_c_lookup ("<keyword>"));
+  scm_class_keyword = scm_i_smob_class[SCM_TC2SMOBNUM (scm_tc16_keyword)];
   scm_class_unknown = scm_variable_ref (scm_c_lookup ("<unknown>"));
   scm_class_procedure = scm_variable_ref (scm_c_lookup ("<procedure>"));
   scm_class_primitive_generic = scm_variable_ref (scm_c_lookup 
("<primitive-generic>"));
diff --git a/libguile/goops.c b/libguile/goops.c
index 07e922d..cbb0f63 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -121,7 +121,6 @@ static SCM class_procedure_class;
 static SCM class_applicable_struct_class;
 static SCM class_applicable_struct_with_setter_class;
 static SCM class_number, class_list;
-static SCM class_keyword;
 static SCM class_port, class_input_output_port;
 static SCM class_input_port, class_output_port;
 static SCM class_foreign_slot;
@@ -880,8 +879,6 @@ create_smob_classes (void)
   for (i = 0; i < SCM_I_MAX_SMOB_TYPE_COUNT; ++i)
     scm_i_smob_class[i] = SCM_BOOL_F;
 
-  scm_i_smob_class[SCM_TC2SMOBNUM (scm_tc16_keyword)] = class_keyword;
-
   for (i = 0; i < scm_numsmob; ++i)
     if (scm_is_false (scm_i_smob_class[i]))
       scm_i_smob_class[i] = scm_make_extended_class (SCM_SMOBNAME (i),
@@ -1136,7 +1133,6 @@ SCM_DEFINE (scm_sys_goops_early_init, 
"%goops-early-init", 0, 0, 0,
   class_real = scm_variable_ref (scm_c_lookup ("<real>"));
   class_integer = scm_variable_ref (scm_c_lookup ("<integer>"));
   class_fraction = scm_variable_ref (scm_c_lookup ("<fraction>"));
-  class_keyword = scm_variable_ref (scm_c_lookup ("<keyword>"));
   class_unknown = scm_variable_ref (scm_c_lookup ("<unknown>"));
   class_procedure = scm_variable_ref (scm_c_lookup ("<procedure>"));
   class_primitive_generic = scm_variable_ref (scm_c_lookup 
("<primitive-generic>"));
diff --git a/module/oop/goops.scm b/module/oop/goops.scm
index ef57f7a..a93659b 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -608,7 +608,6 @@
 (define-standard-class <real> (<complex>))
 (define-standard-class <integer> (<real>))
 (define-standard-class <fraction> (<real>))
-(define-standard-class <keyword> (<top>))
 (define-standard-class <unknown> (<top>))
 (define-standard-class <procedure> (<applicable>)
   #:metaclass <procedure-class>)



reply via email to

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