1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 02:00:20 +02:00
Commit graph

21 commits

Author SHA1 Message Date
Andy Wingo
2a610be594 add generic array implementation facility
* libguile/array-handle.c (scm_i_register_array_implementation):
  (scm_i_array_implementation_for_obj): Add generic array facility,
  which will (in a few commits) detangle the array code.
  (scm_array_get_handle): Use the generic array facility. Note that
  scm_t_array_handle no longer has ref and set function pointers;
  instead it has a pointer to the array implementation. It is unlikely
  that code out there used these functions, however, as the supported
  way was through scm_array_handle_ref/set_x.
  (scm_array_handle_pos): Move this function here from arrays.c.
  (scm_array_handle_element_type): New function, returns a Scheme value
  representing the type of element stored in this array.

* libguile/array-handle.h (scm_t_array_element_type): New enum, for
  generically determining the type of an array.
  (scm_array_handle_rank):
  (scm_array_handle_dims): These are now just #defines.

* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/srfi-4.c:
* libguile/strings.c:
* libguile/vectors.c: Register array implementations for all of these.

* libguile/inline.h: Update for array_handle_ref/set change.
* libguile/deprecated.h: Need to include arrays.h now.
2009-07-19 15:15:40 +02:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Ludovic Courtès
f30e1bdf97 Changes from arch/CVS synchronization 2006-12-12 14:01:40 +00:00
Marius Vollmer
af4f861210 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
of the arguments is a array.  This allows vectors to be equal to
one-dimensional arrays.

* tests/unif.test ("vector equal? one-dimensional array"): New.
2006-05-29 21:54:13 +00:00
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Kevin Ryde
fcae94c51e (array-in-bounds?): Add a test failing in the current code. 2005-06-05 21:37:59 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Kevin Ryde
6017642112 (make-shared-array): Add failing case shared of shared. 2005-05-04 00:30:04 +00:00
Marius Vollmer
34ea161776 (exception:wrong-num-indices): New, use it for array-set! tests with
wrong number of indices.
2005-01-10 01:44:34 +00:00
Marius Vollmer
a483777244 (have-llvect?): Removed, Scheme code will always
have u64 and s64 uniform vectors.
2005-01-06 18:58:30 +00:00
Marius Vollmer
28c1c15c75 Use *unspecified* instead of #f to get an uninitialized array. 2005-01-04 23:41:48 +00:00
Marius Vollmer
3963764d1d Rewritten for new 'typed' approach to uniform arrays. 2005-01-02 21:03:52 +00:00
Marius Vollmer
bd6713d5ea Replaced uniform-array-set1! with just array-set!. Do not check
improper index lists, which can't arise with uarray-set!.  Use
"#s16()" instead of "#h()".
2004-11-12 19:00:22 +00:00
Marius Vollmer
af4701b0de Removed tests that tried to store a character into a byte vector,
which no longer works.  Characters are not bytes.
2004-10-27 19:34:17 +00:00
Marius Vollmer
400f0fb716 (array-equal?): New test. 2004-09-29 15:49:38 +00:00
Kevin Ryde
2291a3a7e9 (array-fill!): Exercise byte range and type checks. 2004-08-06 01:08:12 +00:00
Kevin Ryde
3fdb855887 (uniform-vector-ref): Exercise byte returns. 2004-08-06 00:27:31 +00:00
Kevin Ryde
7f9ca7c3d7 (array-set!): Exercise byte array range checks. 2004-08-06 00:17:12 +00:00
Kevin Ryde
a1f3180a92 (array-set!): Exercise svect value range check. 2004-07-27 23:27:51 +00:00
Kevin Ryde
d2866d6e2f (array?, array-fill!, array-prototype): Add tests. 2004-02-12 00:23:42 +00:00
Kevin Ryde
f410f8e7ba New file.
(uniform-array-set1!): Exercise this, in particular previous segv on
improper arg list.
2004-01-06 22:19:23 +00:00