This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Jim Blandy writes: > > In order to make it possible to mix reads and writes on socket ports > (see Christian Lynbech's bug), I would like to change the way the port > functions work (see scm_ptobfuns in ports.h). This change makes the > port functions more versatile and consistent, but it will break all > existing port implementations. The compiler will catch the error, and > the fix is small and simple. > > Has anyone out there written C code that adds new port types to Guile? > This is probably the case iff your code calls scm_newptob. A. Jaffer uses ptobs for the curses module of Scm scheme, for implementing WINDOW objects. I didn't understand port objects at all back then, and they aren't sufficiently documented. So I settled for normal smobs. Unfortunately it isn't possible to reconstruct 'window ports' as softports in scheme code, because the port closing routine would produce a stray pointer when wrapped as subr, causing segfaults which should be avoided in any case. So when a window port facility will be judged to be useful by competent people, I'll try to add it after the change of the ptob code. Any opinions on that ? Let's hope that they get documented somehow better than now ... Klaus Schilling