| Commit message (Expand) | Author | Age | Files | Lines |
* | Fix segfault introduced with R6RS port commit...* libguile/init.c (scm_i_init_guile): Move scm_register_r6rs_ports
later, so that defining port types hsa the SCM trampoline subrs
defined.
* libguile/bytevectors.c (scm_bootstrap_bytevectors): Cosmetic changes.
| Andy Wingo | 2017-02-28 | 1 | -5/+6 |
* | Register R6RS port and bytevector internals early...* libguile/bytevectors.c (sym_big, sym_little): Rename from scm_sym_big
and scm_sym_little, and don't use the snarf mechanism as we need to
initialize this value eagerly in case the C API is used before the
Scheme module is loaded.
(scm_bootstrap_bytevectors): Initialize the endianness symbols here.
* libguile/r6rs-ports.c (scm_register_r6rs_ports): Register the R6RS
port kinds here, for the same reason.
| Andy Wingo | 2017-02-28 | 1 | -12/+12 |
* | Reuse SCM_BYTEVECTOR_TYPED_LENGTH in scm_array_get_handle...* libguile/bytevectors.h (SCM_BYTEVECTOR_TYPE_SIZE,
SCM_BYTEVECTOR_TYPED_LENGTH): Moved from libguile/bytevectors.c.
* libguile/array-handle.c (scm_array_get_handle): Reuse
SCM_BYTEVECTOR_TYPED_LENGTH.
| Daniel Llorens | 2016-11-23 | 1 | -5/+0 |
* | Fix size measurement in bytevector_large_set...* libguile/bytevectors.c (bytevector_large_set): Fix computation of
value size in words.
* test-suite/tests/bytevectors.test: Add test.
Thanks to Ben Rocer <fleabyte@mail.com> for the bug report and fix.
| Andy Wingo | 2016-06-20 | 1 | -3/+4 |
* | Remove scm_putc_unlocked....* libguile/ports.h (scm_putc_unlocked): Remove.
* libguile/ports.c (scm_putc): Replace implementation with
scm_putc_unlocked's implementation.
(scm_port_print): Use scm_putc.
* libguile/arbiters.c:
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/continuations.c:
* libguile/dynl.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/macros.c:
* libguile/mallocs.c:
* libguile/print.c:
* libguile/programs.c:
* libguile/promises.c:
* libguile/r6rs-ports.c:
* libguile/smob.c:
* libguile/srcprop.c:
* libguile/struct.c:
* libguile/variable.c:
* libguile/weak-set.c:
* libguile/weak-table.c: Use scm_putc instead of scm_putc_unlocked.
| Andy Wingo | 2016-04-26 | 1 | -4/+4 |
* | Merge commit '8cf2a7ba7432d68b9a055d29f18117be70375af9' | Andy Wingo | 2015-01-22 | 1 | -1/+6 |
|\ |
|
| * | Fix bytevector-fill! to accept fill arguments greater than 127....Fixes <http://bugs.gnu.org/19027>.
* libguile/bytevectors.c (scm_bytevector_fill_x): Accept fill arguments
between -128 and 255.
* test-suite/tests/bytevectors.test ("2.2 General Operations"): Add
tests.
| Mark H Weaver | 2014-11-12 | 1 | -1/+6 |
* | | Merge commit '81d2c84674f03f9028f26474ab19d3d3f353881a'...Some fixups in bytevectors.c.
| Andy Wingo | 2015-01-22 | 1 | -39/+36 |
|\| |
|
| * | Avoid signed overflow and use size_t in bytevectors.c....* libguile/bytevectors.c (ULONG_MAX): Remove (unportable) fallback
definition. It is no longer used.
(scm_make_bytevector): Use 'size_t' instead of 'unsigned' for
indices. Use 'scm_t_uint8' instead of 'signed char' for elements
and c_fill. Previously relied on GNU-C-specific behavior when
casting integers in the range 128-255 to signed char.
(GENERIC_INTEGER_ACCESSOR_PROLOGUE, INTEGER_LIST_TO_BYTEVECTOR)
(scm_bytevector_eq_p, scm_bytevector_copy_x, scm_bytevector_copy)
(scm_bytevector_to_u8_list, scm_u8_list_to_bytevector)
(scm_bytevector_fill_x): Use 'size_t' instead of 'unsigned' for
indices. Use 'scm_t_uint8' for elements.
| Mark H Weaver | 2014-11-12 | 1 | -38/+35 |
* | | Merge commit 'fdd319e9bd4121d844662d3d8ccc69b462b60840' | Andy Wingo | 2015-01-22 | 1 | -1/+1 |
|\| |
|
| * | Fix bytevector-copy when applied to SRFI-4 homogeneous numeric vectors....Fixes <http://bugs.gnu.org/18866>.
Reported by tantalum <sph@posteo.eu>.
* libguile/bytevectors.c (scm_bytevector_copy): Always create a VU8
bytevector.
* test-suite/tests/bytevectors.test: Add test.
| Mark H Weaver | 2014-11-11 | 1 | -2/+2 |
* | | Merge branch 'stable-2.0'...Conflicts:
benchmark-suite/benchmarks/ports.bm
libguile/async.h
libguile/bytevectors.c
libguile/foreign.c
libguile/gsubr.c
libguile/srfi-1.c
libguile/vm-engine.h
libguile/vm-i-scheme.c
module/Makefile.am
module/language/tree-il/analyze.scm
module/language/tree-il/peval.scm
module/scripts/compile.scm
module/scripts/disassemble.scm
test-suite/tests/asm-to-bytecode.test
test-suite/tests/peval.test
test-suite/tests/rdelim.test
| Mark H Weaver | 2014-09-30 | 1 | -5/+11 |
|\| |
|
| * | Fix shrinking of contiguous bytevectors, as from 'get-bytevector-n'....Fixes <http://bugs.gnu.org/17466>.
Reported by J Kalbhenn <jkal@posteo.eu>.
* libguile/bytevectors.c (scm_c_shrink_bytevector): When BV is
contiguous, add use of 'SCM_BYTEVECTOR_SET_CONTENTS'.
| Ludovic Courtès | 2014-05-28 | 1 | -5/+11 |
* | | Remove array impl. registry; instead, hard-code array handle creation...* libguile/array-handle.h (scm_t_vector_ref, scm_t_vector_set): Rename
from scm_t_array_ref, scm_t_array_set. These were named
scm_i_t_array_ref and scm_i_t_array_set in 1.8 and 2.0. Change to
take the vector directly, instead of the array handle. In this way,
generic array handles are layered on top of specific implementations
of backing stores.
Remove scm_t_array_implementation, introduced in 2.0 but never
documented. It was a failed attempt to layer the array implementation
that actually introduced too many layers, as it prevented the "vref"
and "vset" members of scm_t_array_handle (called "ref" and "set" in
1.8, not present in 2.0) from specializing on array backing stores.
(scm_i_register_array_implementation) (scm_i_array_implementation_for_obj):
Remove these internal interfaces.
(scm_t_array_handle): Adapt to scm_t_vector_ref / scm_t_vector_set
change.
(scm_array_handle_ref, scm_array_handle_set): Adapt to change in
vref/vset prototype.
* libguile/array-handle.c (scm_array_get_handle): Inline all the
necessary initializations here for all specific array types.
* libguile/array-map.c (rafill, racp, ramap, rafe, array_index_map_1):
* libguile/arrays.c: Remove array implementation code.
* libguile/bitvectors.h:
* libguile/bitvectors.c: Remove array implementation code.
(scm_i_bitvector_bits): New internal interface.
* libguile/bytevectors.c: Remove array implementation code.
* libguile/srfi-4.h: Remove declarations for internal procedures that
don't exist (!).
* libguile/strings.c: Remove array implementation code.
* libguile/vectors.c: Remove array implementation code.
| Andy Wingo | 2014-02-09 | 1 | -175/+3 |
* | | RTL compiler supports static bitvectors...* libguile/arrays.c (scm_from_contiguous_typed_array):
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): For
bitvectors, round up the length to 32-bit units, as they are stored
internally. Otherwise I think this probably does the wrong thing for
the last word on big-endian systems.
* libguile/bitvectors.c (BITVECTOR_LENGTH, BITVECTOR_BITS):
(scm_c_make_bitvector): Reorder the length and pointer words to match
the layout of bytevectors.
* module/language/cps/primitives.scm (*branching-primcall-arities*):
* module/system/vm/assembler.scm (br-if-bitvector):
* module/system/vm/disassembler.scm (code-annotation): Add bitvector
test support.
* module/system/vm/assembler.scm (<uniform-vector-backing-store>): Add
an element-size field.
(intern-constant): Adapt make-uniform-vector-backing-store call. Use
uniform-array->bytevector, as the old compiler did.
(link-data): Add bitvector cases.
| Andy Wingo | 2013-11-03 | 1 | -2/+3 |
* | | In bytevector->uint-list et al, check that SIZE divides the bv length....Fixes <http://bugs.gnu.org/15100>.
Reported by Göran Weinholt <goran@weinholt.se>.
* libguile/bytevectors.c (INTEGERS_TO_LIST): Enforce the R6RS
requirement that SIZE divides the bytevector length.
* test-suite/tests/bytevectors.test: Add test. Remove tests that
assumes that this "divides" check is not enforced.
| Mark H Weaver | 2013-08-16 | 1 | -1/+5 |
* | | Merge remote-tracking branch 'origin/stable-2.0' | Mark H Weaver | 2013-08-16 | 1 | -5/+3 |
|\| |
|
| * | Improved error checking in bytevector->uint-list and bytevector->sint-list....Partially fixes <http://bugs.gnu.org/15100>.
Reported by Göran Weinholt <goran@weinholt.se>.
* libguile/bytevectors.c (INTEGERS_TO_LIST): Make sure SIZE isn't 0.
Allow SIZE to be greater than the bytevector length, for consistency
with allowing extra bytes at the end when the bytevector length is
non-zero. Use scm_from_size_t instead of scm_from_uint.
* test-suite/tests/bytevectors.test: Add tests. Remove a test that
checks for an exception when SIZE is greater than the bytevector
length.
| Mark H Weaver | 2013-08-16 | 1 | -5/+3 |
* | | string->utf8 implementation uses scm_from_utf8_stringn...* libguile/bytevectors.c (UTF_TO_STRING): Use scm_from_utf8_stringn.
| Andy Wingo | 2013-01-15 | 1 | -2/+1 |
* | | fix bug where scm_from_utf8_stringn would not detect bad utf-8...* libguile/strings.c (scm_from_utf8_stringn):
* libguile/symbols.c (utf8_string_equals_wide_string): The "bad UTF8"
return from u8_mbtouc is a 0xfffd character, not a negative byte
length. Fixes a bug in which invalid UTF-8 would not be caught.
* libguile/bytevectors.c (scm_utf8_to_string): Use scm_from_utf8_stringn
directly. Just a little cleanup.
* test-suite/tests/iconv.test ("narrow non-ascii string"): Add test for
parsing bad utf-8 with substitution.
| Andy Wingo | 2013-01-15 | 1 | -3/+2 |
* | | Merge commit 'd10f7b572c0ca1ccef87f9c46069daa30946e0cf'...Conflicts:
libguile/smob.c
libguile/smob.h
test-suite/tests/tree-il.test
| Andy Wingo | 2012-04-26 | 1 | -51/+20 |
|\| |
|
| * | bytevectors: Fix IEEE-754 endianness conversion....Fixes <http://bugs.gnu.org/11310>.
Reported by Klaus Stehle <klaus.stehle@uni-tuebingen.de>.
* libguile/ieee-754.h: Remove.
* libguile/Makefile.am (noinst_HEADERS): Remove `ieee-754.h'.
* libguile/bytevectors.c (scm_ieee754_float, scm_ieee754_double): New
unions.
(float_to_foreign_endianness, float_from_foreign_endianness,
double_to_foreign_endianness, double_from_foreign_endianness): Rewrite
in terms of the new unions.
* test-suite/tests/bytevectors.test ("2.8 Operations on IEEE-754
Representations")["single, little endian", "single, big endian",
"double, little endian", "double, big endian"]: New tests.
| Ludovic Courtès | 2012-04-22 | 1 | -51/+20 |
* | | Revert "wrap iconv_open / iconv_close with a lock to help in thread/fork issues"...This reverts commit 8dfb7bbfd908ca883d0fdd0d868e13e6b20803ae.
| Andy Wingo | 2012-02-23 | 1 | -6/+0 |
* | | wrap iconv_open / iconv_close with a lock to help in thread/fork issues...* libguile/bytevectors.c (STRING_TO_UTF, scm_string_to_utf8)
(UTF_TO_STRING):
* libguile/ports.c (open_iconv_descriptors, close_iconv_descriptors):
* libguile/strings.c (scm_from_stringn, scm_to_stringn): Wrap operations
that acquire and destroy iconv contexts with a mutex. While iconv is
threadsafe, internally it uses a lock, and we need to make sure when
we fork() that no one has that lock -- so we surround it with another
one. Gross.
| Andy Wingo | 2012-02-17 | 1 | -0/+6 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
libguile/read.c
test-suite/tests/tree-il.test
| Andy Wingo | 2012-02-11 | 1 | -26/+30 |
|\| |
|
| * | more efficient scm_string_to_utf8, scm_string_to_utf32...* libguile/bytevectors.c (scm_string_to_utf8): More efficient
implementation.
(scm_string_to_utf32): Likewise.
| Andy Wingo | 2012-02-10 | 1 | -26/+30 |
* | | Revert "add SCM_HEAP_OBJECT_BASE"...This reverts commit 47ed8656db8800f3ad20a40eb2c4e9ef3dc891e3.
Conflicts:
libguile/foreign.c
| Andy Wingo | 2012-01-31 | 1 | -1/+1 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
configure.ac
libguile/fluids.c
libguile/gc.c
libguile/gc.h
libguile/objcodes.c
libguile/procprop.c
libguile/vm.c
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
| Andy Wingo | 2011-12-01 | 1 | -3/+3 |
|\| |
|
| * | Allow overlapping regions to be passed to `bytevector-copy!'....Reported by Dmitry Chestnykh <dmitry@codingrobots.com>.
Fixes <http://debbugs.gnu.org/10070>.
* libguile/bytevectors.c (scm_bytevector_copy_x): Use `memmove', not
`memcpy'.
* test-suite/tests/bytevectors.test ("2.2 General
Operations")["bytevector-copy! overlapping"]: New test.
* doc/ref/api-data.texi (Bytevector Manipulation): Mention possible
overlapping.
| Ludovic Courtès | 2011-11-20 | 1 | -3/+3 |
* | | locking for putc, puts...* libguile/ports.c (scm_putc, scm_puts):
* libguile/ports.h (scm_putc_unlocked, scm_puts_unlocked): Separate into
_unlocked and locked variants. Change all callers to use the
_unlocked versions.
| Andy Wingo | 2011-11-08 | 1 | -4/+4 |
* | | add SCM_HEAP_OBJECT_BASE...* libguile/tags.h (SCM_HEAP_OBJECT_BASE): New macro. Given a SCM,
returns a pointer to the start of its memory area on the heap.
* libguile/bytevectors.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/gc.h:
* libguile/guardians.c:
* libguile/numbers.h:
* libguile/ports.c:
* libguile/smob.c:
* libguile/struct.c:
* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Use it.
| Andy Wingo | 2011-10-24 | 1 | -1/+1 |
* | | add SCM_{PACK,UNPACK}_POINTER...* libguile/tags.h (SCM_UNPACK_POINTER, SCM_PACK_POINTER): New macros.
The old SCM2PTR and PTR2SCM were defined in such a way that
round-tripping through a pointer could lose precision, even in the
case in which you weren't interested in actually dereferencing the
pointer, it was simply that you needed to plumb a SCM through APIs
that take pointers. These new macros are more like SCM_PACK and
SCM_UNPACK, but for pointer types. The bit representation of the
pointer should be the same as the scm_t_bits representation.
* libguile/gc.h (PTR2SCM, SCM2PTR): Remove support for (old) UNICOS
pointers. We are going to try tagging the SCM object itself in the
future, and I don't think that keeping this support is worth its
cost. It probably doesn't work anyway.
* libguile/backtrace.c:
* libguile/bytevectors.c:
* libguile/continuations.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/gc.h:
* libguile/guardians.c:
* libguile/hashtab.c:
* libguile/load.c:
* libguile/numbers.c:
* libguile/ports.c:
* libguile/smob.c:
* libguile/strings.c:
* libguile/symbols.c:
* libguile/vm.c:
* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Update many sites to use the new macros.
| Andy Wingo | 2011-10-24 | 1 | -2/+2 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
libguile/bytevectors.c
libguile/bytevectors.h
libguile/objcodes.c
libguile/r6rs-ports.c
libguile/strings.c
libguile/vm.c
| Andy Wingo | 2011-08-31 | 1 | -2/+2 |
|\| |
|
| * | fix a couple of leaks...* libguile/bytevectors.h:
* libguile/bytevectors.c (scm_c_take_gc_bytevector): Rename this
internal function, from scm_c_take_bytevector. This indicates that
unlike the other scm_take_* functions, this one takes GC-managed
memory.
* libguile/objcodes.c (scm_objcode_to_bytecode):
* libguile/vm.c (really_make_boot_program): Use
scm_gc_malloc_pointerless, not scm_malloc. Thanks to Stefan
Israelsson Tampe!
* libguile/r6rs-ports.c:
* libguile/strings.c: Adapt to renames.
| Andy Wingo | 2011-08-18 | 1 | -1/+1 |
| * | minor style fix in bytevectors.c...* libguile/bytevectors.c (SCM_BYTEVECTOR_HEADER_BYTES): Use sizeof
scm_t_bits, not sizeof SCM. It's the same, but it seems like the
right thing.
| Andy Wingo | 2011-07-29 | 1 | -1/+1 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
GUILE-VERSION
test-suite/tests/srfi-4.test
| Andy Wingo | 2011-07-25 | 1 | -24/+66 |
|\| |
|
| * | Add type and range checks to the complex generalized vector accessors....* libguile/bytevectors.c (COMPLEX_ACCESSOR_PROLOGUE, COMPLEX_NATIVE_REF,
COMPLEX_NATIVE_SET): New macros.
(bytevector_ref_c32, bytevector_ref_c64): Defined in terms of
`COMPLEX_NATIVE_REF'.
(bytevector_set_c32, bytevector_set_c64): Defined in terms of
`COMPLEX_NATIVE_SET'.
(bytevector_ref_fns): Make `static'.
* test-suite/tests/srfi-4.test ("c32 vectors")["generalized-vector-ref",
"generalized-vector-set!", "generalized-vector-ref, out-of-range",
"generalized-vector-set!, out-of-range"]: New tests.
("c64 vectors")["generalized-vector-ref", "generalized-vector-set!",
"generalized-vector-ref, out-of-range",
"generalized-vector-set!, out-of-range"]: New tests.
| Ludovic Courtès | 2011-07-01 | 1 | -46/+64 |
| * | Fix unaligned accesses for bytevectors of complex numbers....* libguile/bytevectors.c (bytevector_ref_c32, bytevector_ref_c64,
bytevector_set_c32, bytevector_set_c64): Use `memcpy' to avoid
unaligned accesses. This fixes SIGBUS on SPARC and possibly other
alignment-sensitive platforms.
| Ludovic Courtès | 2011-07-01 | 1 | -10/+34 |
* | | remove SCM_I_SIZE limits defines...* libguile/__scm.h: Remove defines for SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN,
and SCM_I_SSIZE_MAX, as there is no longer a scm_t_size / scm_size_t
type.
* libguile/bytevectors.c (make_bytevector): Replace a use of
SCM_I_SIZE_MAX with ((size_t) -1).
| Andy Wingo | 2011-05-15 | 1 | -1/+1 |
* | | merge strictness branch from 2.0 | Andy Wingo | 2011-05-13 | 1 | -4/+4 |
|\| |
|
| * | scm_is_eq for SCM vals, not == or !=...* libguile/bytevectors.c (scm_make_bytevector, STRING_TO_UTF)
(UTF_TO_STRING):
* libguile/continuations.c (scm_i_check_continuation):
* libguile/expand.h (SCM_EXPANDED_P):
* libguile/fluids.c (scm_i_make_with_fluids):
* libguile/generalized-vectors.c (scm_make_generalized_vector):
* libguile/goops.c (SCM_GOOPS_UNBOUNDP, slot_definition_using_name):
(scm_c_extend_primitive_generic, more_specificp, scm_make)
* libguile/i18n.c (SCM_VALIDATE_OPTIONAL_LOCALE_COPY):
(scm_locale_string_to_integer)
* libguile/modules.c (resolve_duplicate_binding):
(scm_module_reverse_lookup)
* libguile/posix.c (scm_to_resource):
* libguile/r6rs-ports.c (scm_put_bytevector):
* libguile/socket.c (scm_connect, scm_bind, scm_sendto
* libguile/stacks.c (find_prompt):
* libguile/variable.c (scm_variable_ref, scm_variable_bound_p):
* libguile/vm-engine.h (ASSERT_BOUND_VARIABLE, ASSERT_BOUND)
* libguile/vm-i-system.c (VARIABLE_BOUNDP, local_bound)
(long_local_bound, fluid_ref): Use scm_is_eq to compare, not == / !=.
| Andy Wingo | 2011-05-13 | 1 | -4/+4 |
| * | Fix bytevectors VALIDATE_REAL to test for reals, not rationals...Reported and fixed by Daniel Llorens <dll@bluewin.ch>.
* libguile/bytevectors.c (VALIDATE_REAL): Test for reals, not rationals.
* test-suite/tests/srfi-4.test (f32 vectors, f64 vectors): Add tests.
| Mark H Weaver | 2011-03-08 | 1 | -1/+1 |
* | | bytevectors have internal parent field...* libguile/bytevectors.h (SCM_BYTEVECTOR_HEADER_SIZE): Bump, giving
bytevectors another word: a parent pointer. Will allow for
sub-bytevectors and efficient mmap bindings.
* libguile/bytevectors.c (make_bytevector):
(make_bytevector_from_buffer): Init parent to #f.
(scm_c_take_bytevector, scm_c_take_typed_bytevector): Another
argument, the parent, which gets set in the bytevector.
* libguile/foreign.c (scm_pointer_to_bytevector): Use the parent field
instead of registering a weak reference from bytevector to foreign
pointer.
* libguile/objcodes.c (scm_objcode_to_bytecode): Use the parent field to
avoid copying the objcode.
* libguile/srfi-4.c (DEFINE_SRFI_4_C_FUNCS):
* libguile/strings.c (scm_from_stringn):
* libguile/vm.c (really_make_boot_program):
* libguile/r6rs-ports.c (scm_get_bytevector_some)
(scm_get_bytevector_all, bytevector_output_port_procedure): Set the
parent to #f.
| Andy Wingo | 2011-05-07 | 1 | -6/+23 |
* | | Fix bytevectors VALIDATE_REAL to test for reals, not rationals...Reported and fixed by Daniel Llorens <dll@bluewin.ch>.
* libguile/bytevectors.c (VALIDATE_REAL): Test for reals, not rationals.
* test-suite/tests/srfi-4.test (f32 vectors, f64 vectors): Add tests.
| Mark H Weaver | 2011-03-08 | 1 | -1/+1 |
|/ |
|
* | use scm_from_latin1_symboln for string literals and load-symbol...* libguile/bytevectors.c:
* libguile/eval.c:
* libguile/goops.c:
* libguile/i18n.c:
* libguile/load.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/ports.c:
* libguile/print.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/read.c:
* libguile/script.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/strings.c:
* libguile/throw.c:
* libguile/vm.c: Use scm_from_latin1_symboln to make symbols from string
literals, because they aren't in the user's locale -- they are in
ASCII, and we can optimize this case.
* libguile/vm-i-loader.c: Also use scm_from_latin1_symboln when loading
narrow symbols.
| Andy Wingo | 2011-01-07 | 1 | -3/+3 |
* | make-string et al nulls memory if not given an initializer...* libguile/gc-malloc.c: Add a note that the gc-malloc does not clear the
memory block, so users need to make sure it is initialized.
* libguile/bitvectors.c (scm_c_make_bitvector):
* libguile/bytevectors.c (scm_make_bytevector):
* libguile/strings.c (scm_c_make_string): If no initializer is given,
initialize the bytes to 0. Prevents information leakage if an app uses
make-string et al without initializers.
* libguile/foreign.c (make_cif): Initialize this too, to prevent leakage
in the struct holes. Paranoia...
| Andy Wingo | 2010-12-04 | 1 | -0/+2 |
* | fix a number of assuptions that a long could hold an inum...* libguile/bytevectors.c:
* libguile/goops.c:
* libguile/instructions.c:
* libguile/numbers.c:
* libguile/random.c:
* libguile/read.c:
* libguile/vm-i-scheme.c: Fix a number of assumptions that a long could
hold an inum. This is not the case on platforms whose void* is larger
than their long.
* libguile/numbers.c (scm_i_inum2big): New helper, only implemented for
sizeof(void*) == sizeof(long); produces a compile error on other
platforms. Basically gmp doesn't have a nice interface for converting
between mpz values and intmax_t.
| Andy Wingo | 2010-11-19 | 1 | -4/+4 |
* | rename (rnrs bytevector) to (rnrs bytevectors)...* module/rnrs/bytevectors.scm: Rename to (rnrs bytevectors), from (rnrs
bytevector), to match the name from the R6RS.
* benchmark-suite/benchmarks/bytevectors.bm:
* doc/ref/api-data.texi:
* doc/ref/api-foreign.texi:
* libguile/bytevectors.c:
* module/6/rnrs.scm:
* module/language/assembly.scm:
* module/language/assembly/compile-bytecode.scm:
* module/language/assembly/decompile-bytecode.scm:
* module/language/glil/compile-assembly.scm:
* module/language/tree-il/primitives.scm:
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm:
* module/system/foreign.scm:
* test-suite/standalone/test-ffi:
* test-suite/tests/asm-to-bytecode.test:
* test-suite/tests/bytevectors.test:
* test-suite/tests/foreign.test:
* test-suite/tests/r6rs-ports.test: Update all referrers.
| Andy Wingo | 2010-06-01 | 1 | -1/+1 |
* | more fixes to equal? for arrays...* libguile/array-map.c (array_compare, scm_array_equal_p): Rewrite as
something that operates on the generic array handle infrastructure.
Based on array->list.
(scm_i_array_equal_p): Change the docs, as array-equal? is now the same
as equal?, except that it typechecks its args.
* doc/ref/api-compound.texi (Array Procedures): Update array-equal?
docs.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_raequal): Deprecate.
* libguile/bytevectors.c (scm_bytevector_eq_p): Bugfix: bytevectors are
bytevector=? only if their element type is the same.
* libguile/eq.c (scm_equal_p): Only dispatch to scm_array_equal_p if
both args are arrays (generically).
* test-suite/tests/arrays.test ("equal?"): Add some more tests.
| Andy Wingo | 2010-04-01 | 1 | -1/+2 |
* | rename libguile to libguile-@EFFECTIVE_VERSION@, currently libguile-2.0...* libguile/Makefile.am (lib_LTLIBRARIES): Instead of just "libguile.la",
make "libguile-@EFFECTIVE_VERSION@.la". This allows multiple versions
of Guile to be installed at once. See
http://www106.pair.com/rhp/parallel.html for a rationale.
(libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS): Fixup automake vars
to include the effective version.
(guile_LDADD): Fix up the spelling of libguile.
* libguile/bytevectors.c (scm_bootstrap_bytevectors):
* libguile/foreign.c (scm_register_foreign):
* libguile/i18n.c (scm_bootstrap_i18n):
* libguile/instructions.c (scm_bootstrap_instructions):
* libguile/objcodes.c (scm_bootstrap_objcodes):
* libguile/programs.c (scm_bootstrap_programs):
* libguile/vm.c (scm_bootstrap_vm): Register extensions using e.g.
"libguile-2.0" as the libname -- i.e., including the effective version
in the libname.
* module/ice-9/i18n.scm:
* module/rnrs/bytevector.scm:
* module/rnrs/io/ports.scm:
* module/system/foreign.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm: When doing a load-extension for something in
Guile, use the effective version also.
* meta/guile-2.0-uninstalled.pc.in (Libs):
* meta/guile-2.0.pc.in (Libs): Use -lguile-@EFFECTIVE_VERSION@. This
change should mean that code built against Guile should not be
affected by the libguile rename.
* guile-readline/Makefile.am (libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD):
* srfi/Makefile.am
(libguile_srfi_srfi_1_v_@LIBGUILE_SRFI_SRFI_1_MAJOR@_la_LIBADD):
(libguile_srfi_srfi_4_v_@LIBGUILE_SRFI_SRFI_4_MAJOR@_la_LIBADD):
(libguile_srfi_srfi_13_14_v_@LIBGUILE_SRFI_SRFI_13_14_MAJOR@_la_LIBADD):
(libguile_srfi_srfi_60_v_@LIBGUILE_SRFI_SRFI_60_MAJOR@_la_LIBADD):
* test-suite/standalone/Makefile.am (test_num2integral_LDADD):
(test_round_LDADD):
(libtest_asmobs_la_LIBADD):
(libtest_ffi_la_LIBADD):
(test_list_LDADD):
(test_unwind_LDADD):
(test_conversion_LDADD):
(test_loose_ends_LDADD):
(test_scm_c_read_LDADD):
(test_scm_take_locale_symbol_LDADD):
(test_scm_take_u8vector_LDADD):
(libtest_extensions_la_LIBADD):
(test_with_guile_module_LDADD):
(test_scm_with_guile_LDADD): Fix up the spelling of libguile.la.
| Andy Wingo | 2010-03-16 | 1 | -1/+2 |