roxen.lists.pike.general

Subject Author Date
Re: FakeFile() and to assign() or not to assign() Martin Stjernholm <mast[at]lysator[dot]liu[dot]se> 12-02-2009
"Mirar @ Pike  importmöte för mailinglistan" <<6341[at]lyskom.lysator.liu.se>>
wrote:

> I thought that was because Stdio.FILE were allowed to buffer, while
> Stdio.File is supposed to be lowlevel and not buffer. (Like fd->write
> and FILE*->fwrite in C.)

True, the contents of a FakeFile is a string, which you might call
buffer. But implementing unread() and ungets() would require another
buffer on top of it, so you'd have to add much of the Stdio.FILE
implementation on top of FakeFile too. I think a good solution would
be if Stdio.FILE and FakeFILE shared the same implementation.