mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Remove scm_generalized_vector_get_handle
This was deprecated in 2.0.9 (118ff892be
).
* libguile/bitvectors.c (scm_bitvector_writable_elements): Replace
scm_generalized_vector_get_handle.
Remove unnecessary #includes.
* libguile/vectors.c (scm_vector_writable_elements): Replace
scm_generalized_vector_get_handle.
Remove unnecessary #includes.
* libguile/random.c (scm_random_normal_vector_x): Replace
scm_generalized_vector_get_handle.
* libguile/generalized-vectors.h, libguile/generalized-vectors.c
(scm_generalized_vector_get_handle): Remove.
Remove unnecessary #includes.
* NEWS: Add removal notice.
This commit is contained in:
parent
1e8293aabf
commit
46ed57a177
6 changed files with 27 additions and 30 deletions
4
NEWS
4
NEWS
|
@ -891,6 +891,10 @@ but not specifically mentioned earlier in this file, have been removed:
|
|||
removed. Use `get-bytevector-n!' and `put-bytevector' from (rnrs io
|
||||
ports) instead.
|
||||
|
||||
*** `scm_generalized_vector_get_handle' has been removed. Use
|
||||
`scm_array_get_handle' to get a handle and `scm_array_handle_rank'
|
||||
to check the rank.
|
||||
|
||||
** Remove miscellaneous unused interfaces
|
||||
|
||||
We have removed accidentally public, undocumented interfaces that we
|
||||
|
|
|
@ -27,12 +27,9 @@
|
|||
|
||||
#include "libguile/_scm.h"
|
||||
#include "libguile/__scm.h"
|
||||
#include "libguile/strings.h"
|
||||
#include "libguile/array-handle.h"
|
||||
#include "libguile/bitvectors.h"
|
||||
#include "libguile/arrays.h"
|
||||
#include "libguile/generalized-vectors.h"
|
||||
#include "libguile/srfi-4.h"
|
||||
|
||||
/* Bit vectors. Would be nice if they were implemented on top of bytevectors,
|
||||
* but alack, all we have is this crufty C.
|
||||
|
@ -205,7 +202,12 @@ scm_bitvector_elements (SCM vec,
|
|||
size_t *lenp,
|
||||
ssize_t *incp)
|
||||
{
|
||||
scm_generalized_vector_get_handle (vec, h);
|
||||
scm_array_get_handle (vec, h);
|
||||
if (1 != scm_array_handle_rank (h))
|
||||
{
|
||||
scm_array_handle_release (h);
|
||||
scm_wrong_type_arg_msg (NULL, 0, vec, "rank 1 bit array");
|
||||
}
|
||||
if (offp)
|
||||
{
|
||||
scm_t_array_dim *dim = scm_array_handle_dims (h);
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#include "libguile/_scm.h"
|
||||
#include "libguile/__scm.h"
|
||||
|
||||
#include "libguile/array-handle.h"
|
||||
#include "libguile/generalized-arrays.h"
|
||||
#include "libguile/generalized-vectors.h"
|
||||
|
||||
|
||||
|
@ -69,17 +67,6 @@ SCM_DEFINE (scm_make_generalized_vector, "make-generalized-vector", 2, 1, 0,
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
void
|
||||
scm_generalized_vector_get_handle (SCM vec, scm_t_array_handle *h)
|
||||
{
|
||||
scm_array_get_handle (vec, h);
|
||||
if (scm_array_handle_rank (h) != 1)
|
||||
{
|
||||
scm_array_handle_release (h);
|
||||
scm_wrong_type_arg_msg (NULL, 0, vec, "vector");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
scm_init_generalized_vectors ()
|
||||
{
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#ifndef SCM_GENERALIZED_VECTORS_H
|
||||
#define SCM_GENERALIZED_VECTORS_H
|
||||
|
||||
/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008, 2009, 2013 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008, 2009, 2013
|
||||
* 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
|
||||
|
@ -24,15 +25,11 @@
|
|||
|
||||
|
||||
#include "libguile/__scm.h"
|
||||
#include "libguile/array-handle.h"
|
||||
|
||||
|
||||
|
||||
/* Generalized vectors */
|
||||
|
||||
SCM_API void scm_generalized_vector_get_handle (SCM vec,
|
||||
scm_t_array_handle *h);
|
||||
|
||||
SCM_API SCM scm_make_generalized_vector (SCM type, SCM len, SCM fill);
|
||||
SCM_INTERNAL void scm_i_register_vector_constructor (SCM type, SCM (*ctor)(SCM, SCM));
|
||||
|
||||
|
|
|
@ -621,7 +621,13 @@ SCM_DEFINE (scm_random_normal_vector_x, "random:normal-vector!", 1, 1, 0,
|
|||
state = SCM_VARIABLE_REF (scm_var_random_state);
|
||||
SCM_VALIDATE_RSTATE (2, state);
|
||||
|
||||
scm_generalized_vector_get_handle (v, &handle);
|
||||
scm_array_get_handle (v, &handle);
|
||||
if (1 != scm_array_handle_rank (&handle))
|
||||
{
|
||||
scm_array_handle_release (&handle);
|
||||
scm_wrong_type_arg_msg (NULL, 0, v, "rank 1 array");
|
||||
}
|
||||
|
||||
dim = scm_array_handle_dims (&handle);
|
||||
|
||||
if (handle.element_type == SCM_ARRAY_ELEMENT_TYPE_SCM)
|
||||
|
|
|
@ -25,15 +25,10 @@
|
|||
|
||||
#include "libguile/_scm.h"
|
||||
#include "libguile/eq.h"
|
||||
#include "libguile/strings.h"
|
||||
|
||||
#include "libguile/validate.h"
|
||||
#include "libguile/vectors.h"
|
||||
#include "libguile/arrays.h" /* Hit me with the ugly stick */
|
||||
#include "libguile/generalized-vectors.h"
|
||||
#include "libguile/strings.h"
|
||||
#include "libguile/srfi-13.h"
|
||||
#include "libguile/dynwind.h"
|
||||
#include "libguile/array-handle.h"
|
||||
|
||||
#include "libguile/bdw-gc.h"
|
||||
|
||||
|
@ -68,7 +63,13 @@ scm_vector_elements (SCM vec, scm_t_array_handle *h,
|
|||
if (SCM_I_WVECTP (vec))
|
||||
scm_wrong_type_arg_msg (NULL, 0, vec, "non-weak vector");
|
||||
|
||||
scm_generalized_vector_get_handle (vec, h);
|
||||
scm_array_get_handle (vec, h);
|
||||
if (1 != scm_array_handle_rank (h))
|
||||
{
|
||||
scm_array_handle_release (h);
|
||||
scm_wrong_type_arg_msg (NULL, 0, vec, "rank 1 array of Scheme values");
|
||||
}
|
||||
|
||||
if (lenp)
|
||||
{
|
||||
scm_t_array_dim *dim = scm_array_handle_dims (h);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue