unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* cvs srfi-1 for-each segv
@ 2005-01-09 22:18 Kevin Ryde
  2005-01-10  1:53 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2005-01-09 22:18 UTC (permalink / raw)


Something has broken in the srfi-1 for-each.  Eg.

	(use-modules (srfi srfi-1))
	(for-each noop '(1 2 3) '(4 5) '())
	=> seg fault

Bit of a trace and some printfs suggest maybe the lists are mangled
somehow by SCM_SIMPLE_VECTOR_REF, though I don't see how.  Are you
supposed to use that macro with an scm_vector result now?


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cvs srfi-1 for-each segv
  2005-01-09 22:18 cvs srfi-1 for-each segv Kevin Ryde
@ 2005-01-10  1:53 ` Marius Vollmer
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2005-01-10  1:53 UTC (permalink / raw)


Kevin Ryde <user42@zip.com.au> writes:

> Something has broken in the srfi-1 for-each.  Eg.
>
> 	(use-modules (srfi srfi-1))
> 	(for-each noop '(1 2 3) '(4 5) '())
> 	=> seg fault


Oops, I made a small typo when changing the code to use
SCM_SIMPLE_VECTOR_REF.

2005-01-10  Marius Vollmer  <mvo@zagadka.de>

	* srfi-1.c (check_args): Bugfix to change from 2005-01-02: ARGV is
	the vector to check, not ARGS.

> Bit of a trace and some printfs suggest maybe the lists are mangled
> somehow by SCM_SIMPLE_VECTOR_REF, though I don't see how.  Are you
> supposed to use that macro with an scm_vector result now?

Yes, scm_vector is guaranteed to return a simple vector, and you can
use SCM_SIMPLE_VECTOR_REF with the result.  You can also use
scm_c_vector_ref, of course, or scm_vector_elements +
scm_array_handle_release.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-10  1:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-09 22:18 cvs srfi-1 for-each segv Kevin Ryde
2005-01-10  1:53 ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).