1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

4 commits

Author SHA1 Message Date
Daniel Llorens
f52fc0566f Support non-zero lower bounds in array-slice-for-each
* libguile/array-handle.c (scm_array_handle_writable_elements): Fix
  error message.
* libguile/array-map.c (scm_array_slice_for_each): Support non-zero
  lower bounds. Fix error messages.
* test-suite/tests/array-map.test: Test scm_array_slice_for_each with
  non-zero lower bound argument.
2017-10-31 13:23:17 +01:00
Daniel Llorens
4212f29655 Allow scm_XXX_writable_elements on empty vectors, even if immutable
* libguile/array-handle.c (initialize_vector_handle): Set both element
  pointers to NULL if the vector is empty.
* libguile/array-map.c (racp): Ignore immutability if destination is
  empty.
* test-suite/tests/sort.test: Check empty/mutable/immutable vectors with
  sort!.
* test-suite/tests/array-map.test: Check array-copy! with
  empty/immutable destination.
2017-10-31 13:23:17 +01:00
Daniel Llorens
7e93950552 Final names for new array functions
Globally rename (array-from* -> array-slice), (array-from ->
array-cell-ref), (array-amend! -> array-cell-set!), (array-for-each-cell
-> array-slice-for-each).
2017-01-09 09:02:04 +01:00
Daniel Llorens
7ef9d0ac2b New functions (array-for-each-cell, array-for-each-cell-in-order)
* libguile/array-map.c (scm_i_array_rebase, scm_array_for_each_cell):
  New functions. Export scm_array_for_each_cell() as
  (array-for-each-cell).

  (array-for-each-cell-in-order): Define additional export.

* libguile/array-map.h (scm_i_array_rebase, scm_array_for_each_cell):
  Add prototypes.

* test-suite/tests/array-map.test: Renamed from
  test-suite/tests/ramap.test, fix module name. Add tests for
  (array-for-each-cell).

* test-suite/Makefile.am: Apply rename array-map.test -> ramap.test.
2016-11-23 13:04:49 +01:00
Renamed from test-suite/tests/ramap.test (Browse further)