summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix trap handlers to handle applicable structs.Ian Price2014-01-091-9/+12
| | | | | | | | Reported by Jordy Dickinson <jordy.dickinson@gmail.com>. Fixes <http://bugs.gnu.org/15691>. * module/system/vm/traps.scm (frame-matcher): Extract procedure when proc is an applicable struct.
* Fix 'string-copy!' to work properly with overlapping src/dest.Mark H Weaver2014-01-082-6/+22
| | | | | | | * libguile/srfi-13.c (scm_string_copy_x): Fix to work properly with overlapping src/dest. * test-suite/tests/srfi-13.test ("string-copy!"): Add tests.
* Implement 'exact-integer?' and 'scm_is_exact_integer'.Mark H Weaver2014-01-084-4/+72
| | | | | | | | | | | | | * libguile/numbers.c (scm_exact_integer_p, scm_is_exact_integer): New procedures. (scm_integer_p): Improve docstring. * libguile/numbers.h (scm_exact_integer_p, scm_is_exact_integer): New prototypes. * doc/ref/api-data.texi (Integers): Add docs. * test-suite/tests/numbers.test ("exact-integer?"): Add tests.
* Fix doc that incorrectly claimed (integer? +inf.0) => #t.Mark H Weaver2014-01-081-2/+2
| | | | | | | | Fixes <http://bugs.gnu.org/16356>. Reported by Zefram <zefram@fysh.org>. * doc/ref/api-data.texi (Integers): Add docs. Fix outdated example that incorrectly showed (integer? +inf.0) => #t.
* scm_primitive_load: Simplify code using 'scm_open_file_with_encoding'.Mark H Weaver2014-01-081-10/+5
| | | | | * libguile/load.c (scm_primitive_load): Use 'scm_open_file_with_encoding'.
* boot-9: add comment about autoload thread-unsafety.Mark H Weaver2014-01-081-0/+3
| | | | | * module/ice-9/boot-9.scm: Add comment about lack of thread-safety in handling of autoloads.
* read: Avoid signed integer overflow in 'read_decimal_integer'.Mark H Weaver2014-01-081-0/+3
| | | | * libguile/read.c (read_decimal_integer): Avoid overflow.
* Increment SCM_N_READ_OPTIONS for 'curly-infix' option.Mark H Weaver2014-01-081-1/+1
| | | | | * libguile/private-options.h (SCM_N_READ_OPTIONS): Increment to 8. This should have been done when the 'curly-infix' was added.
* Fix inlining of tail list to apply.Ian Price2014-01-072-19/+35
| | | | | | | | Fixes <http://bugs.gnu.org/15533>. * module/language/tree-il/peval.scm (peval): Final list argument to `apply' should not be inlined if it is mutable. * test-suite/tests/peval.test ("partial evaluation"): Add test.
* Thank Aleix.Ludovic Courtès2013-12-211-0/+1
|
* allow specifying a required version in GUILE_PROGSAleix Conchillo Flaque2013-12-211-8/+37
| | | | | | | | * meta/guile.m4: GUILE_PROGS now takes an optional argument to specify a required Guile version. By default, it requires Guile >= 2.0. A micro version can also be specified (e.g. GUILE_PROGS([2.0.10])). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Revert "Fix bound-identifier=? to compare binding names, not just symbolic ↵Mark H Weaver2013-12-163-7/+0
| | | | | | names." This reverts commit 70c74b847680d3b239e591afa2e99c51a712980c.
* Fix bound-identifier=? to compare binding names, not just symbolic names.Mark H Weaver2013-12-153-0/+7
| | | | | | | | | | | Fixes <http://bugs.gnu.org/16158>. * module/ice-9/psyntax.scm (bound-id=?): Use 'id-var-name' to compare binding names (gensyms), not just symbolic names. * module/ice-9/psyntax-pp.scm: Regenerate. * test-suite/tests/syntax.test: Add test.
* Hide EINTR returns from 'accept'.Ludovic Courtès2013-12-151-1/+1
| | | | * libguile/socket.c (scm_accept): Wrap 'accept' call in 'SCM_SYSCALL'.
* syntax-case: fix error reporting for misplaced ellipses.Mark H Weaver2013-12-133-19/+80
| | | | | | | | | | | | | | Reported by taylanbayirli@gmail.com (Taylan Ulrich B.). * module/ice-9/psyntax.scm (cvt*): Use 'syntax-case' to destructure the pattern tail, instead of 'pair?', 'car', and 'cdr'. (gen-clause): When checking for errors, check for misplaced ellipsis before duplicate pattern variables, to improve the error message in case of multiple misplaced ellipses. * module/ice-9/psyntax-pp.scm: Regenerate. * test-suite/tests/syntax.test: Add tests.
* THANKS Tom Tromey.Mark H Weaver2013-12-131-0/+1
| | | | * THANKS: Add Tom Tromey to fixes section.
* Add missing FUNC_NAME defines for pair accessors.Tom Tromey2013-12-121-1/+92
| | | | | | | | | * libguile/pairs.c (scm_car, scm_cdr, scm_caar, scm_cadr, scm_cdar, scm_cddr, scm_caaar, scm_caadr, scm_cadar, scm_caddr, scm_cdaar, scm_cdadr, scm_cddar, scm_cdddr, scm_caaaar, scm_caaadr, scm_caadar, scm_caaddr, scm_cadaar, scm_cadadr, scm_caddar, scm_cadddr, scm_cdaaar, scm_cdaadr, scm_cdadar, scm_cdaddr, scm_cddaar, scm_cddadr, scm_cdddar, scm_cddddr): Add missing FUNC_NAME defines.
* Fix computation of LIBLOBJS.Tom Tromey2013-12-121-4/+5
| | | | | | | Fixes <http://bugs.gnu.org/14193>. * configure.ac (LIBLOBJS): Add prefix to computed .lo file name so dependencies work properly.
* vm: Gracefully handle stack overflows.Ludovic Courtès2013-12-052-1/+29
| | | | | | | | | | Fixes <http://lists.gnu.org/archive/html/guile-user/2013-12/msg00017.html>. Reported by rvclayton@verizon.net (R. Clayton). * libguile/vm.c (reinstate_stack_reserve): New function. (vm_error_stack_overflow): Install it as an unwind handler. * test-suite/tests/control.test ("the-vm")["stack overflow reinstates stack reserve"]: New test.
* Fix brainfuck commentAndy Wingo2013-12-021-4/+1
| | | | * module/language/brainfuck/parse.scm: Fix outdated comment.
* Fix brainfuck->scheme compiler.Andy Wingo2013-12-021-6/+3
| | | | | * module/language/brainfuck/compile-scheme.scm (compile-scheme): Fix brainfuck compiler.
* GOOPS doc fix: #:dsupers is the init keyword for the dsupers slot.Mark H Weaver2013-12-011-3/+3
| | | | | * doc/ref/goops.texi (Metaclasses): #:dsupers is the initialization keyword for the dsupers slot, not #:supers.
* Critical sections in guardians do not need to block asyncsAndy Wingo2013-11-281-7/+6
| | | | | * libguile/guardians.c: Critical sections here cannot cause an async_tick, so they do not need to block asyncs.
* Deprecate gc-live-object-statsAndy Wingo2013-11-284-39/+20
| | | | | | | | * libguile/gc.h: * libguile/gc.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_gc_live_object_stats): Deprecate; it hasn't worked in the whole 2.0 series.
* Make (ice-9 popen) thread-safe.Mark H Weaver2013-11-231-34/+52
| | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/15683>. Reported by David Pirotte <david@altosw.be>. * module/ice-9/popen.scm: Import (ice-9 threads) and (srfi srfi-9). (<pipe-info>): New record type. (port/pid-table): Mark as deprecated in comment. (port/pid-table-mutex): New variable. (open-pipe*): Store the pid in the pipe-info record, and store the pipe-info as a port property. Guard the pipe-info instead of the port. Lock 'port/pid-table-mutex' while mutating 'port/pid-table'. (fetch-pid): Removed. (fetch-pipe-info): New procedure. (close-process-quietly): Removed. (close-pipe): Use 'fetch-pipe-info' instead of 'fetch-pid'. Clear the pid from the pipe-info. Improve error messages. (reap-pipes): Adapt to the fact that the pipe-info is now guarded instead of the port. Incorporate the 'waitpid' code that was previously in 'close-process-quietly', but let the port finalizer close the port. Clear the pid from the pipe-info.
* Stylistic improvements for (ice-9 popen).Mark H Weaver2013-11-231-24/+21
| | | | | | * module/ice-9/popen.scm (close-process, close-process-quietly): Accept 'port' and 'pid' as separate arguments. Improve style. (close-pipe, read-pipes): Improve style.
* Make port properties accessible from Scheme.Mark H Weaver2013-11-233-21/+31
| | | | | | | | | | | | * libguile/ports.c (scm_i_port_alist, scm_i_set_port_alist_x): Removed. (scm_i_port_property, scm_i_set_port_property_x): New procedures, available from Scheme as '%port-property' and '%set-port-property!'. * libguile/ports.h (scm_i_port_alist, scm_i_set_port_alist_x): Removed. (scm_i_port_property, scm_i_set_port_property_x): New prototypes. * libguile/read.c (set_port_read_option, init_read_options): Adapt to use scm_i_port_property and scm_i_set_port_property_x.
* Make guardians thread-safe.Mark H Weaver2013-11-231-2/+16
| | | | | | | * libguile/guardians.c (t_guardian): Add mutex. (finalize_guarded, scm_i_guard, scm_i_get_one_zombie): Lock mutex and block system asyncs during critical sections. (scm_make_guardian): Initialize mutex.
* Block system asyncs while 'overrides_lock' is held.Mark H Weaver2013-11-231-2/+8
| | | | | | * libguile/procprop.c (scm_set_procedure_property_x): Block system asyncs while overrides_lock is held. Use dynwind block in case an exception is thrown.
* Add mutex locking functions that also block asyncs.Mark H Weaver2013-11-233-0/+33
| | | | | | | | | | | * libguile/async.h (scm_i_pthread_mutex_lock_block_asyncs, scm_i_pthread_mutex_unlock_unblock_asyncs): New macros. * libguile/threads.c (do_unlock_with_asyncs): New static helper. (scm_i_dynwind_pthread_mutex_lock_block_asyncs): New function. * libguile/threads.h (scm_i_dynwind_pthread_mutex_lock_block_asyncs): Add prototype.
* Convert test-suite/tests/exceptions.test to use hygienic macros.Chris K. Jester-Young2013-11-221-12/+14
| | | | | | * test-suite/tests/exceptions.test (push): New syntax parameter. (throw-test): Convert to a syntax-rules macro, using syntax parameters to support the otherwise-unhygienic use of "push".
* Web: accept "UTC" as the zone offset in date headers.Mark H Weaver2013-11-191-0/+2
| | | | | | | Fixes <http://bugs.gnu.org/14128>. Reported by Aleix Conchillo Flaqué <aconchillo@gmail.com>. * module/web/http.scm (parse-zone-offset): Accept "UTC".
* THANKS David ThompsonMark H Weaver2013-11-181-0/+1
| | | | * THANKS: Add David Thompson to list of contributors.
* Add procedures to convert alists into hash tables.David Thompson2013-11-184-1/+104
| | | | | | | | * module/ice-9/hash-table.scm: New module. * test-suite/tests/hash.test ("alist conversion"): Add tests. * doc/ref/api-compound.texi (Hash Table Reference): Add docs.
* Convert guile exceptions to R6RS conditions in R6RS exception handlers.Mark H Weaver2013-11-182-17/+205
| | | | | | | | | | | | | | | | | | | | | | | | | * module/rnrs/exceptions.scm (&guile): New condition type. (guile-condition-converters): New variable. (convert-guile-condition, default-guile-condition-converter, set-guile-condition-converter!, guile-common-conditions, guile-lexical-violation-converter, guile-syntax-violation-converter, guile-assertion-violation-converter, guile-system-error-converter, guile-undefined-violation-converter, guile-error-converter, guile-implementation-restriction-converter): New procedures. (with-exception-handler): Catch all exceptions, not just R6RS exceptions. Convert native Guile exceptions to R6RS conditions, preserving the original Guile exception information in the &guile condition object. (raise): If the condition includes a &guile condition, use 'throw' to throw the original native guile exception instead of raising an R6RS exception. * test-suite/tests/r6rs-exceptions.test ("guile condition conversions"): Add tests.
* Improve error when 'include' form with relative path is not in a file.Mark H Weaver2013-11-182-4/+17
| | | | | | | | | Reported by Nala Ginrut <nalaginrut@gmail.com>. * module/ice-9/psyntax.scm (include): Give a proper error message when given a relative file name, and when the form is not in a file. * module/ice-9/psyntax-pp.scm: Regenerate.
* Add more entries to .gitignoreMark H Weaver2013-11-171-0/+4
| | | | | * .gitignore: Add /lib/poll.h, /lib/sys/select.h, /lib/sys/times.h, and /test-suite/standalone/test-scm-c-bind-keyword-arguments.
* i18n: Fix null pointer dereference when locale info is missing.Ludovic Courtès2013-11-131-1/+3
| | | | | * libguile/i18n.c (scm_nl_langinfo): Check whether C_RESULT is NULL before calling 'strdup'.
* Don't use the identifier 'noreturn'.Mark H Weaver2013-11-043-3/+3
| | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/15798>. Reported by Matt Sicker <boards@gmail.com>. * libguile/__scm.h (SCM_NORETURN): Use ((__noreturn__)) instead of ((noreturn)). * libguile/throw.h (scm_ithrow): Rename formal parameter from 'noreturn' to 'no_return'. * libguile/throw.c (scm_ithrow): Rename formal parameter from 'noreturn' to 'no_return'.
* Fix optional end argument in `uniform-vector-read!'.Ian Price2013-10-201-2/+2
| | | | | | | | Fixes <http://bugs.gnu.org/15370>. Reported by Thien-Thi Nguyen <ttn@gnu.org>. * libguile/deprecated.c (scm_uniform_vector_read_x): Only multiply by width when argument supplied.
* Doc: 'unfold-right' takes a tail not a tail generator.Ian Price2013-10-191-2/+2
| | | | | | | Reported by David Kastrup <dak@gnu.org>. * doc/ref/srfi-modules.texi (SRFI-1 Fold and Map): Change argument name, and default value.
* Doc: mention vectors are self-quotingIan Price2013-10-181-13/+9
| | | | | | | Reported by Dmitry Bogatov <KAction@gnu.org>. * doc/ref/api-compound.texi (Vector Syntax, Vector Creation): Mention that vectors are self-quoting. Remove examples with quote signs.
* doc: Update the section on SMOBs and memory management.Ludovic Courtès2013-10-141-115/+59
| | | | | | | | | | | | * doc/ref/libguile-smobs.texi (Describing a New Type): Only list 'print' and 'equalp' as compulsory. Explain why 'mark' and 'free' are optional. (Creating Smob Instances): Remove paragraphs about allocations that might fail etc. Use 'scm_gc_malloc_pointerless' for the pixel buffer. (Garbage Collecting Smobs): Explain when the 'mark' and 'free' functions are needed. (Garbage Collecting Simple Smobs): Remove.
* 'scm_c_read' goes through the fast path with ISO-8859-1 unbuffered ports.Ludovic Courtès2013-10-141-1/+3
| | | | | | | Discussed in <http://bugs.gnu.org/15368>. * libguile/ports.c (scm_c_read): Enter the 'swap_buffer' case when pt->encoding is "ISO-8859-1".
* Fix edge case in 'ash'.Mark H Weaver2013-10-032-4/+13
| | | | | | | | * libguile/numbers.c (left_shift_exact_integer): Fix edge case where N is -1 and count is SCM_I_FIXNUM_BIT-1 to return the most negative fixnum. Previously this result was returned as a bignum. * test-suite/tests/numbers.test (ash): Add tests.
* Revert "Fix edge case in 'ash'."Mark H Weaver2013-10-032-14/+5
| | | | This reverts commit 8df68898b9f6ba15171244f1f3549688f13d605f.
* Deprecate scm_c_program_source, as it has no internal users.Andy Wingo2013-10-034-10/+18
| | | | | | | * libguile/programs.c: * libguile/programs.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_c_program_source): Deprecate.
* Fix edge case in 'ash'.Mark H Weaver2013-10-032-5/+14
| | | | | | | * libguile/numbers.c (scm_ash): Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum. * test-suite/tests/numbers.test (ash): Add tests.
* Fix minor mistakes in documentation.Mark H Weaver2013-09-303-3/+3
| | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/15487>. Reported by Josep Portella Florit <jpf@primfilat.com>. * doc/ref/api-i18n.texi (i18n Introduction, Text Collation, Internationalization, Internationalization): LC_MESSAGE --> LC_MESSAGES. * doc/ref/api-procedures.texi (Compiled Procedures): program-lambda-alist --> program-lambda-list. * THANKS: Fix alignment of Josep Portella Florit.
* Fix truncated documentation for 'put-char'.Mark H Weaver2013-09-132-0/+2
| | | | | | | | | | Fixes <http://bugs.gnu.org/15152>. Reported by Josep Portella Florit <jpf@primfilat.com>. * doc/ref/api-io.texi (R6RS Textual Output): Fix truncated docs for 'put-char'. * THANKS: Add Josep Portella Florit to fixes section.