summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support general arrays in random:hollow-sphere!wip-llodaDaniel Llorens2017-10-272-78/+132
| | | | | | * libguile/random.c (vector_scale_x, vector_sum_squares): Handle general rank-1 #t or 'f64 arrays. * test-suite/tests/random.test: Add tests for random:hollow-sphere!.
* Remove scm_generalized_vector_get_handleDaniel Llorens2017-10-276-30/+27
| | | | | | | | | | | | | | | | | This was deprecated in 2.0.9 (118ff892be199f0af359d1b027645d4783a364ec). * 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.
* Fix bitvectors and non-zero lower bound arrays in truncated-printDaniel Llorens2017-10-275-56/+169
| | | | | | | | | | | | | | * module/ice-9/arrays.scm (array-print-prefix): New private function. * libguile/arrays.c (scm_i_print_array): Reuse (array-print-prefix) from (ice-9 arrays). Make sure to release the array handle. * module/ice-9/pretty-print.scm (truncated-print): Support bitvectors. Don't try to guess the array prefix but call array-print-prefix from (ice-9 arrays) instead. Fix call to print-sequence to support non-zero lower bound arrays. * test-suite/tests/arrays.test: Test that arrays print properly. * test-suite/tests/print.test: Test truncated-print with bitvectors, non-zero lower bound arrays.
* Support non-zero lower bounds in array-slice-for-eachDaniel Llorens2017-10-272-13/+17
| | | | | | | | | * 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.
* Fix sort, sort! for arrays with nonzero lower boundDaniel Llorens2017-10-276-140/+208
| | | | | | | | | | | | * module/ice-9/arrays.scm (array-copy): New function, export. * module/Makefile.am: Install (ice-9 arrays). * doc/ref/api-data.texi: Add documentation for (ice-9 arrays). * libguile/quicksort.i.c: Use signed bounds throughout. * libguile/sort.c (scm_restricted_vector_sort_x): Fix error calls. Fix calls to quicksort. * test-suite/tests/sort.test: Actually test that the sorted results match the original data. Test cases for non-zero base index arrays for sort, sort!, and stable-sort!.
* Remove documentation on uniform-vector-read!, uniform-vector-writeDaniel Llorens2017-10-272-33/+7
| | | | | | * NEWS: Add specific removal notice. * doc/ref/api-data.texi: Remove documentation on uniform-vector-read!, uniform-vector-write.
* Replace uniform-vector-read benchmark with bytevector-io benchmarkDaniel Llorens2017-10-272-16/+15
| | | | | | | | * benchmark-suite/benchmarks/uniform-vector-read.bm: Remove; uniform-vector-read! and uniform-vector-write were deprecated in 2.0 and are have been removed in 2.1. * benchmark-suite/benchmarks/bytevector-io.bm: New benchmark. * benchmark-suite/Makefile.am: Run the new benchmark.
* Allow scm_XXX_writable_elements on empty vectors, even if immutableDaniel Llorens2017-10-274-12/+30
| | | | | | | | | | | * 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.
* Allow garbage collection of revealed file ports.Ludovic Courtès2017-10-254-51/+69
| | | | | | | | | | | | | | | | | | | | | | Reported at <https://bugs.gnu.org/28784>. Discussed at <https://lists.gnu.org/archive/html/guile-devel/2017-10/msg00003.html>. * libguile/fports.c (revealed_ports, revealed_lock): Remove. (scm_revealed_count): Just return 'SCM_REVEALED (port)'. (scm_set_port_revealed_x, scm_adjust_port_revealed_x): Remove REVEALED_PORTS manipulation. (fport_close): Do nothing when SCM_REVEALED (port) > 0. * libguile/fports.h (scm_t_fport): Adjust comment; make 'revealed' unsigned. * libguile/ports.c (do_close): Call 'close_port' instead of 'scm_close_port'. (scm_close_port): Rename to... (close_port): ... this. Add 'explicit' parameter. Clear 'revealed' field when PORT is a file port and EXPLICIT is true. (scm_close_port): Call 'close_port'. * test-suite/tests/ports.test ("close-port & revealed port") ("revealed port fdes not closed"): New tests.
* 'frame-matcher' doesn't crash when the last IP is unknown.Ludovic Courtès2017-10-251-2/+3
| | | | | | | | | This fixes a bug when using ",break": system/vm/traps.scm:127:31: system/vm/traps.scm:127:31: In procedure <: Wrong type: #f * module/system/vm/traps.scm (frame-matcher): Check whether END is true.
* Add struct-ref/unboxed, struct-set!/unboxedAndy Wingo2017-09-255-49/+200
| | | | | | | | | | | | | | | | | | | * NEWS: Add news entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Update documentation. * libguile/struct.c (scm_i_struct_equalp): Avoid using struct-ref on unboxed fields. (scm_struct_ref, scm_struct_set_x_unboxed): Issue deprecation warning when accessing unboxed fields. (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions. * libguile/struct.h (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions. * module/oop/goops.scm (class-add-flags!, class-clear-flags!): (class-has-flags?, <class>, %allocate-instance, <slot>): (compute-get-n-set, unboxed-get, unboxed-set, unboxed-slot?): (allocate-slots, %prep-layout!, make-standard-class, initialize): Adapt to access unboxed nfields and flags fields via the new accessors.
* GOOPS slot access protected via slot accessors, not struct permsAndy Wingo2017-09-231-6/+27
| | | | | | | * module/oop/goops.scm (opaque-slot?, read-only-slot?): New helpers. (allocate-slots): Protect opaque and read-only slots by wrapping the slot accessors instead of relying on struct permissions. (%compute-layout): Remove opaque-slot case.
* Deprecate opaque struct fieldsAndy Wingo2017-09-233-15/+27
| | | | | | | | | | * NEWS: Add entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove mention of opaque field protection. * libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail): Remove discussion of opaque fields. (set_vtable_layout_flags): Issue a deprecation warning when opaque fields are used.
* Remove needless static variables from goops.cAndy Wingo2017-09-221-23/+2
| | | | | | * libguile/goops.c: Remove many static SCM variables that were not used on the C level, like class_protected for <protected-slot> and so on.
* Fix up make-struct-layout and make-struct/no-tail docstringsAndy Wingo2017-09-221-10/+7
| | | | | * libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail): Fix up docstrings for self and tail deprecation.
* Deprecate struct "self" slotsAndy Wingo2017-09-225-15/+38
| | | | | | | | | | | | | | | | * libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use a normal slot instead of a self slot. * libguile/print.c (make_print_state): Initialize "handle" slot manually. * libguile/struct.c (issue_deprecation_warning_for_self_slots): New helper, called when making vtables to issue deprecation warnings for "self" slots. Avoids warning for the "self" slot that's part of the fixed vtable slots. (scm_i_struct_inherit_vtable_magic): Call issue_deprecation_warning_for_self_slots. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove references to self slots. * NEWS: Add entry.
* Remove unused code in struct.cAndy Wingo2017-09-221-34/+0
| | | | | | * libguile/struct.c (scm_make_struct_layout, scm_struct-ref) (scm_struct_set_x): Remove commented-out support for signed and double raw fields.
* Deprecate make-structAndy Wingo2017-09-2211-81/+139
| | | | | | | | | | | | | | | | | | * libguile/struct.c: Replace uses of scm_make_struct with scm_make_struct_no_tail or scm_c_make_struct. (scm_make_struct_no_tail): Move this function to C instead of Scheme to be able to deprecate scm_make_struct. * libguile/struct.h (scm_make_struct_no_tail): New public declaration. * libguile/deprecated.h: * libguile/deprecated.c (scm_make_struct): Deprecate. * libguile/print.c: * libguile/procs.c: * libguile/stacks.c: Replace uses of scm_make_struct with scm_make_struct_no_tail. * test-suite/tests/coverage.test: * test-suite/tests/structs.test: Use make-struct/no-tail instead of make-struct. * NEWS: Add entry.
* Remove references to tail arrays in the documentationAndy Wingo2017-09-201-69/+18
| | | | | * doc/ref/api-data.texi (Vtables, Structure Basics): Update to remove references to tail arrays, in preparation for deprecation.
* Use make-struct/no-tail instead of make-structAndy Wingo2017-09-208-80/+78
| | | | | | | | | | | | * module/ice-9/boot-9.scm: * module/language/cps/effects-analysis.scm: * module/language/elisp/falias.scm: * module/language/tree-il.scm: * module/language/tree-il/primitives.scm: * module/rnrs/records/procedural.scm: * module/srfi/srfi-35.scm: * module/system/base/syntax.scm: Change uses of make-struct to make-struct/no-tail.
* psyntax generates calls to make-struct/no-tailAndy Wingo2017-09-202-83/+97
| | | | | | * module/ice-9/psyntax.scm (define-expansion-constructors): Expand to make-struct/no-tail. * module/ice-9/psyntax-pp.scm: Regenerate.
* put-bytevector, unget-bytevector: Allow start == bytevector length.Mark H Weaver2017-07-311-2/+2
| | | | | | * libguile/r6rs-ports.c (scm_put_bytevector, scm_unget_bytevector): When three arguments (port bv start) are provided, allow start to be equal to the length of the bytevector, resulting in a zero-length write.
* Correctly relativize file names in the presence of common prefixes.Ludovic Courtès2017-06-152-2/+34
| | | | | | | | | * libguile/filesys.c (scm_i_relativize_path): When DIR is a prefix of SCANON, make sure DIR ends with a separator or SCANON starts with a separator. * test-suite/tests/ports.test (%temporary-directory): New variable. ("%file-port-name-canonicalization")["relative canonicalization with common prefixes"]: New test.
* doc: Document 'short' and 'unsigned-short' foreign types.Mark H Weaver2017-06-111-0/+2
| | | | | | | | This is a followup to commit 42f7c01e0a1d1c139ec8b835429a80ab15ac4007. Reported by Adriano Peluso <catonano@gmail.com>. * doc/ref/api-foreign.texi (Foreign Types): Add missing entries for 'short' and 'unsigned-short'.
* Update guile.m4 to check for 2.2 by defaultAndy Wingo2017-05-311-3/+3
| | | | * meta/guile.m4 (GUILE_PKG): Update default Guile versions to 2.2.
* guile.m4 fix for 3.0 prereleasesAndy Wingo2017-05-311-0/+3
| | | | | * meta/guile.m4 (GUILE_PROGS): Allow prereleases of Guile with a new major version.
* Minor updates of README.Andy Wingo2017-05-221-5/+1
| | | | * README: Minor updates.
* Remove legacy NEWS.guile-vm.Andy Wingo2017-05-221-57/+0
| | | | * NEWS.guile-vm: Remove.
* Minor updates to HACKING.Andy Wingo2017-05-221-107/+13
| | | | * HACKING: Minor updates.
* Remove outdated ANNOUNCE.Andy Wingo2017-05-221-60/+0
| | | | * ANNOUNCE: Remove outdated file.
* Remove outdated README.guile-vm.Andy Wingo2017-05-221-117/+0
| | | | * README.guile-vm: Remove.
* web: add support for URI-referenceAndy Wingo2017-05-219-146/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a patch by Daniel Hartwig <mandyke@gmail.com>. * NEWS: Update. * doc/ref/web.texi (URIs): Fragments are properly part of a URI, so remove the incorrect note. Add documentation on URI subtypes. * module/web/uri.scm (uri-reference?): New base type predicate. (uri?, relative-ref?): Specific predicates. (validate-uri-reference): Strict validation. (validate-uri, validate-relative-ref): Specific validators. (build-uri-reference, build-relative-ref): New constructors. (string->uri-reference): Rename from string->uri. (string->uri, string->relative-ref): Specific constructors. (uri->string): Add #:include-fragment? keyword argument. * module/web/http.scm (parse-request-uri): Use `build-uri-reference', and result is a URI-reference, not URI, object. No longer infer an absent `uri-scheme' is `http'. (write-uri): Just use `uri->string'. (declare-uri-header!): Remove unused function. (declare-uri-reference-header!): Update. Rename from `declare-relative-uri-header!'. * test-suite/tests/web-uri.test ("build-uri-reference"): ("string->uri-reference"): Add. ("uri->string"): Also tests for relative-refs. * test-suite/tests/web-http.test ("read-request-line"): ("write-request-line"): Update for no scheme in some URIs. ("entity headers", "request headers"): Content-location, Referer, and Location should also parse relative-URIs. * test-suite/tests/web-request.test ("example-1"): Expect URI-reference with no scheme.
* readline: Avoid interpreting control characters in pastes.Andy Wingo2017-05-174-2/+27
| | | | | | | | | | * NEWS: Update. * doc/ref/repl-modules.texi (Readline Options): Update for bracketed-paste. * guile-readline/readline.h (SCM_READLINE_BRACKETED_PASTE): Add bracketed-paste option. * guile-readline/readline.c (scm_readline_opts): Add bracketed-paste. (scm_init_readline): Wire up the logic.
* On Hurd, skip tests that require working setrlimits for memoryManolis Ragkousis2017-05-162-0/+12
| | | | | | | | On Hurd, setrlimits are not yet implemented. See <https://lists.gnu.org/archive/html/bug-hurd/2017-05/msg00013.html>. * test-suite/standalone/test-out-of-memory: skip for Hurd. * test-suite/standalone/test-stack-overflow: skip for Hurd.
* Fix reading of HTTPS responses that are smaller than port bufferAndy Wingo2017-04-281-2/+12
| | | | | | | | | | * module/web/client.scm (tls-wrap): Use get-bytevector-some instead of get-bytevector-n, to prevent Guile from attempting to read more bytes than are available. Normally trying to read data on a shut-down socket is fine, but but gnutls issues an error if you attempt to read data from a shut-down socket, and that appears to be a security property. Fixes HTTPS requests whose responses are smaller than the port buffer.
* Correct note about Gregorian reform in SRFI-19Zefram2017-04-251-11/+10
| | | | | | | | * doc/ref/srfi-modules.texi (SRFI-19): SRFI-19 specifies proleptic use of the Gregorian calendar, so it was incorrect of the documentation to describe the code as erroneous in doing so. Rewrite the caution more neutrally, and move it to the section about the "date" structure, where it seems most relevant.
* SRFI-19: Swap seconds and nanoseconds in 'current-time-monotonic'.Ludovic Courtès2017-04-221-2/+2
| | | | | | * module/srfi/srfi-19.scm (current-time-monotonic): Swap the 2nd and 3rd arguments. Fixes a regression introduced in commit b11e2922c36c4105797c269c7e616535b702698a.
* Bump version to 2.2.2.v2.2.2Andy Wingo2017-04-211-3/+3
| | | | * GUILE-VERSION: Bump to 2.2.2.
* Update NEWS some moreAndy Wingo2017-04-211-0/+5
| | | | * NEWS: More updates.
* Update NEWS.Andy Wingo2017-04-211-0/+18
| | | | * NEWS: Update.
* Syntax objects are comparable with equal?Andy Wingo2017-04-213-0/+53
| | | | | | * libguile/eq.c (scm_equal_p, scm_raw_ihash): Add cases for syntax objects, which should be comparable with equal?. * test-suite/tests/syntax.test ("syntax objects"): Add tests.
* SRFI-37: Account for zero-length arguments.Thomas Danckaert2017-04-201-1/+2
| | | | | * module/srfi/srfi-37.scm (args-fold): When checking if an argument is an option (starts with #\-), first check if the length is non-zero.
* Restore libgc 7.2 compatibilityAndy Wingo2017-04-202-1/+9
| | | | | | * configure.ac: Check for GC_is_heap_ptr, added after libgc 7.2. * libguile/pairs.h (GC_is_heap_ptr): Define a shim for GC_is_heap_ptr, inside BUILDING_LIBGUILE so as not to expose it to users.
* GNU Guile 2.2.1.v2.2.1Andy Wingo2017-04-191-3/+3
| | | | | * GUILE-VERSION (GUILE_MICRO_VERSION, LIBGUILE_INTERFACE_CURRENT): (LIBGUILE_INTERFACE_AGE): Increment version.
* Update release docsAndy Wingo2017-04-191-17/+16
| | | | * doc/release.org: Update for 2.2.
* Update NEWSAndy Wingo2017-04-191-1/+19
| | | | * NEWS: Update.
* guile-snarf: skip -g* arguments to avoid build failureSergei Trofimovich2017-04-191-2/+14
| | | | | | | | | * libguile/guile-snarf.in: skip -g* arguments to avoid failure on -ggdb3. Bug: https://bugs.gentoo.org/608190 Bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25803 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* api-procedures.texi: typo: 'an' -> 'on'Sergei Trofimovich2017-04-191-1/+1
| | | | | | * doc/ref/api-procedures.texi: Fix typo. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Documentation typo tweakSergei Trofimovich2017-04-191-1/+1
| | | | | | | * doc/ref/api-data.texi: Tweak 'u+0007' to 'U+0007' (as in the rest of the table). Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix spurious warnings in net_db.cAndy Wingo2017-04-191-2/+2
| | | | | | * libguile/guile-func-name-check (/^SCM_DEFINE /): Fix pattern to not produce spurious warnings. Thanks to Dale Smith for the suggestion. Fixes https://bugs.gnu.org/26123.