mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Merge branch 'master' into boehm-demers-weiser-gc
Conflicts: lib/Makefile.am libguile/Makefile.am libguile/frames.c libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc_os_dep.c libguile/load.c libguile/macros.c libguile/objcodes.c libguile/programs.c libguile/strings.c libguile/vm.c m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/inline.m4
This commit is contained in:
commit
fbb857a472
823 changed files with 61674 additions and 14111 deletions
|
@ -1,18 +1,19 @@
|
|||
/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009 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 as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
|
@ -30,6 +31,7 @@
|
|||
#include "libguile/validate.h"
|
||||
#include "libguile/vectors.h"
|
||||
#include "libguile/unif.h"
|
||||
#include "libguile/bytevectors.h"
|
||||
#include "libguile/ramap.h"
|
||||
#include "libguile/srfi-4.h"
|
||||
#include "libguile/strings.h"
|
||||
|
@ -606,7 +608,7 @@ SCM_DEFINE (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0,
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
||||
|
||||
/* Generalized vectors. */
|
||||
|
||||
int
|
||||
|
@ -615,7 +617,8 @@ scm_is_generalized_vector (SCM obj)
|
|||
return (scm_is_vector (obj)
|
||||
|| scm_is_string (obj)
|
||||
|| scm_is_bitvector (obj)
|
||||
|| scm_is_uniform_vector (obj));
|
||||
|| scm_is_uniform_vector (obj)
|
||||
|| scm_is_bytevector (obj));
|
||||
}
|
||||
|
||||
SCM_DEFINE (scm_generalized_vector_p, "generalized-vector?", 1, 0, 0,
|
||||
|
@ -647,6 +650,8 @@ scm_c_generalized_vector_length (SCM v)
|
|||
return scm_c_bitvector_length (v);
|
||||
else if (scm_is_uniform_vector (v))
|
||||
return scm_c_uniform_vector_length (v);
|
||||
else if (scm_is_bytevector (v))
|
||||
return scm_c_bytevector_length (v);
|
||||
else
|
||||
scm_wrong_type_arg_msg (NULL, 0, v, "generalized vector");
|
||||
}
|
||||
|
@ -671,6 +676,8 @@ scm_c_generalized_vector_ref (SCM v, size_t idx)
|
|||
return scm_c_bitvector_ref (v, idx);
|
||||
else if (scm_is_uniform_vector (v))
|
||||
return scm_c_uniform_vector_ref (v, idx);
|
||||
else if (scm_is_bytevector (v))
|
||||
return scm_from_uint8 (scm_c_bytevector_ref (v, idx));
|
||||
else
|
||||
scm_wrong_type_arg_msg (NULL, 0, v, "generalized vector");
|
||||
}
|
||||
|
@ -696,6 +703,8 @@ scm_c_generalized_vector_set_x (SCM v, size_t idx, SCM val)
|
|||
scm_c_bitvector_set_x (v, idx, val);
|
||||
else if (scm_is_uniform_vector (v))
|
||||
scm_c_uniform_vector_set_x (v, idx, val);
|
||||
else if (scm_is_bytevector (v))
|
||||
scm_i_bytevector_generalized_set_x (v, idx, val);
|
||||
else
|
||||
scm_wrong_type_arg_msg (NULL, 0, v, "generalized vector");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue