guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: searching: example of C extension implementing port


From: Kevin Ryde
Subject: Re: searching: example of C extension implementing port
Date: Wed, 08 Mar 2006 07:55:43 +1100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

"Marco Maggi" <address@hidden> writes:
>
> is there a sample extension implementing an input/output
> channel?

You'll have seen the "Soft Ports" node in the manual, it's pretty
straightforward.

> I'm thinking of a memory channel (not an interface
> to a file or hardware port), something like the string
> port; is the channel API of Guile worth learning for this,

If it's for a lot of bytes, then the scheme-level bits will be very
slow (read/write only 1 byte at a time) and you might have to break
out some C.  (Getting that C level bits into scheme would be a good
thing one day.)

> or is it better to write something of my own?

For reading OLE file contents I did my own read func.  But whether
that's good probably depends what and how much other code is going to
use the port.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]