From fe4a34d20d8342106a46fc2b842a892c17a11920 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 22 Sep 2017 10:25:38 +0200 Subject: Deprecate make-struct * libguile/struct.c: Replace uses of scm_make_struct with scm_make_struct_no_tail or scm_c_make_struct. (scm_make_struct_no_tail): Move this function to C instead of Scheme to be able to deprecate scm_make_struct. * libguile/struct.h (scm_make_struct_no_tail): New public declaration. * libguile/deprecated.h: * libguile/deprecated.c (scm_make_struct): Deprecate. * libguile/print.c: * libguile/procs.c: * libguile/stacks.c: Replace uses of scm_make_struct with scm_make_struct_no_tail. * test-suite/tests/coverage.test: * test-suite/tests/structs.test: Use make-struct/no-tail instead of make-struct. * NEWS: Add entry. --- libguile/struct.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libguile/struct.h') diff --git a/libguile/struct.h b/libguile/struct.h index e8db316c8..257e40e1e 100644 --- a/libguile/struct.h +++ b/libguile/struct.h @@ -3,7 +3,8 @@ #ifndef SCM_STRUCT_H #define SCM_STRUCT_H -/* Copyright (C) 1995,1997,1999,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1999-2001, 2006-2013, 2015, + * 2017 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 @@ -175,7 +176,7 @@ SCM_API SCM scm_make_struct_layout (SCM fields); SCM_API SCM scm_struct_p (SCM x); SCM_API SCM scm_struct_vtable_p (SCM x); SCM_INTERNAL SCM scm_allocate_struct (SCM vtable, SCM n_words); -SCM_API SCM scm_make_struct (SCM vtable, SCM tail_array_size, SCM init); +SCM_API SCM scm_make_struct_no_tail (SCM vtable, SCM init); SCM_API SCM scm_c_make_struct (SCM vtable, size_t n_tail, size_t n_inits, scm_t_bits init, ...); SCM_API SCM scm_c_make_structv (SCM vtable, size_t n_tail, size_t n_inits, -- cgit v1.2.3