diff options
-rw-r--r-- | doc/ref/api-compound.texi | 18 | ||||
-rw-r--r-- | libguile/deprecated.c | 17 | ||||
-rw-r--r-- | libguile/deprecated.h | 4 | ||||
-rw-r--r-- | libguile/struct.c | 11 | ||||
-rw-r--r-- | libguile/struct.h | 3 |
5 files changed, 27 insertions, 26 deletions
diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi index 6fc5b2e46..78d678975 100644 --- a/doc/ref/api-compound.texi +++ b/doc/ref/api-compound.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -@c 2007, 2009, 2010, 2011 Free Software Foundation, Inc. +@c 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @node Compound Data Types @@ -2372,7 +2372,7 @@ to be stored along side usual Scheme @code{SCM} values. * Vtable Vtables:: @end menu -@node Vtables, Structure Basics, Structures, Structures +@node Vtables @subsubsection Vtables A vtable is a structure type, specifying its layout, and other @@ -2460,7 +2460,7 @@ structure. @end deffn -@node Structure Basics, Vtable Contents, Vtables, Structures +@node Structure Basics @subsubsection Structure Basics This section describes the basic procedures for working with @@ -2542,7 +2542,7 @@ This can be used to examine the layout of an unknown structure, see @end deffn -@node Vtable Contents, Vtable Vtables, Structure Basics, Structures +@node Vtable Contents @subsubsection Vtable Contents A vtable is itself a structure, with particular fields that hold @@ -2614,16 +2614,8 @@ from @var{vtable}. @end example @end deffn -@deffn {Scheme Procedure} struct-vtable-tag vtable -@deffnx {C Function} scm_struct_vtable_tag (vtable) -Return the tag of the given @var{vtable}. -@c -@c FIXME: what can be said about what this means? -@c -@end deffn - -@node Vtable Vtables, , Vtable Contents, Structures +@node Vtable Vtables @subsubsection Vtable Vtables As noted above, a vtable is a structure and that structure is itself diff --git a/libguile/deprecated.c b/libguile/deprecated.c index af0752c61..f0211a52f 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -2822,6 +2822,23 @@ SCM_DEFINE (scm_eval_closure_module, +SCM_DEFINE (scm_struct_vtable_tag, "struct-vtable-tag", 1, 0, 0, + (SCM handle), + "Return the vtable tag of the structure @var{handle}.") +#define FUNC_NAME s_scm_struct_vtable_tag +{ + SCM_VALIDATE_VTABLE (1, handle); + scm_c_issue_deprecation_warning + ("struct-vtable-tag is deprecated. What were you doing with it anyway?"); + + return scm_from_unsigned_integer + (((scm_t_bits)SCM_STRUCT_DATA (handle)) >> 3); +} +#undef FUNC_NAME + + + + void scm_i_init_deprecated () { diff --git a/libguile/deprecated.h b/libguile/deprecated.h index 2970262b2..ae0891f88 100644 --- a/libguile/deprecated.h +++ b/libguile/deprecated.h @@ -835,6 +835,10 @@ SCM_DEPRECATED SCM scm_eval_closure_module (SCM eval_closure); +SCM_DEPRECATED SCM scm_struct_vtable_tag (SCM handle); + + + void scm_i_init_deprecated (void); #endif diff --git a/libguile/struct.c b/libguile/struct.c index 326f306ac..e6c7f4bdc 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -917,17 +917,6 @@ SCM_DEFINE (scm_struct_vtable, "struct-vtable", 1, 0, 0, #undef FUNC_NAME -SCM_DEFINE (scm_struct_vtable_tag, "struct-vtable-tag", 1, 0, 0, - (SCM handle), - "Return the vtable tag of the structure @var{handle}.") -#define FUNC_NAME s_scm_struct_vtable_tag -{ - SCM_VALIDATE_VTABLE (1, handle); - return scm_from_unsigned_integer - (((scm_t_bits)SCM_STRUCT_DATA (handle)) >> 3); -} -#undef FUNC_NAME - /* {Associating names and classes with vtables} * * The name of a vtable should probably be stored as a slot. This is diff --git a/libguile/struct.h b/libguile/struct.h index c3c7d8f12..743e7ae66 100644 --- a/libguile/struct.h +++ b/libguile/struct.h @@ -3,7 +3,7 @@ #ifndef SCM_STRUCT_H #define SCM_STRUCT_H -/* Copyright (C) 1995,1997,1999,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1999,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 @@ -184,7 +184,6 @@ SCM_API SCM scm_make_vtable_vtable (SCM extra_fields, SCM tail_array_size, SCM i SCM_API SCM scm_struct_ref (SCM handle, SCM pos); SCM_API SCM scm_struct_set_x (SCM handle, SCM pos, SCM val); SCM_API SCM scm_struct_vtable (SCM handle); -SCM_API SCM scm_struct_vtable_tag (SCM handle); SCM_API SCM scm_struct_vtable_name (SCM vtable); SCM_API SCM scm_set_struct_vtable_name_x (SCM vtable, SCM name); SCM_API void scm_print_struct (SCM exp, SCM port, scm_print_state *); |