1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +02:00

deprecate struct-vtable-tag

* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/struct.c:
* libguile/struct.h:
* doc/ref/api-compound.texi: Deprecate struct-vtable-tag.
This commit is contained in:
Andy Wingo 2012-07-06 18:12:59 +02:00
parent 5d312f3c2c
commit d192791373
5 changed files with 27 additions and 26 deletions

View file

@ -2820,6 +2820,23 @@ SCM_DEFINE (scm_eval_closure_module,
#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);
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

View file

@ -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

View file

@ -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

View file

@ -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 *);