unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* ice-9 lineio read-char versus unread-string
@ 2003-03-23 22:51 Kevin Ryde
  2003-05-03 20:26 ` Marius Vollmer
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Ryde @ 2003-03-23 22:51 UTC (permalink / raw)


In guile 1.6.3 on a recent i386 debian I was nosing around ice-9
lineio and struck an apparent problem with read-char used after an
unread-string.  For instance a program foo.scm

	(use-modules (ice-9 lineio))
	(let ((port (make-line-buffering-input-port
	             (open-input-string "hello"))))
	  (unread-string "world" port)
	  (display (read-char port)) (newline))

run "guile -s foo.scm" produces

  ERROR: Wrong number of arguments to #<primitive-procedure string-ref>

whereas I hoped it would print a character.

I guess this is just a missing index for the string-ref call in the
getc handler of make-line-buffering-input-port.  Judging by the
substring taken I guess it should be 0.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


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

end of thread, other threads:[~2003-05-13 17:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-23 22:51 ice-9 lineio read-char versus unread-string Kevin Ryde
2003-05-03 20:26 ` Marius Vollmer
2003-05-05 17:47   ` Neil Jerram
2003-05-13 17:33     ` Marius Vollmer
2003-05-13 17:46     ` Paul Jarc

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).