roxen.lists.pike.general

Subject Author Date
Re: FakeFile() and to assign() or not to assign() Stephen R. van den Berg <srb[at]cuci[dot]nl> 12-02-2009
Arne Goedeke wrote:
>Stephen R. van den Berg wrote:
>>> Stdio.FILE in;
>>> (in=Stdio.FILE())->assign(Stdio.FakeFile("foo\nbar\n"));
>> Stdio.File(): not open.

>Not sure what you expect it to do. Stdio.File operates on an fd,
>FakeFile does not have any. I think that assign is meant to be used for
>Stdio.File subclasses primarily.

Well, I'd like to have a FakeFile() with getchar(), gets() and unread().
So I thought, opening a Stdio.FILE() with a FakeFile() as source should
do the trick.
-- 
Sincerely,
           Stephen R. van den Berg.
The first 90% of code accounts for the first 90% of development time.
The remaining 10% of code accounts for the other 90% of development time.