Re: Stdio.Buffer, need a way to revisit old positions in the output

"Stephen R. van den Berg" <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
Per Hedbor () @ Pike (-) importm?te f?r mailinglistan wrote:
>> Yes, that would give one a full-blown-protect-you-from-havoc solution
>> even if you don't know what you're doing with the buffer.
>> I still think that that would be more overhead than desirable
>> in high-efficiency buffer operations.

>The main issue is that you are likely to get core dumps if the pointer
>is invalid.

Well, using the set/get_addpos interface, it will result in an
exception at most.

>Also, there is no way to _really_ know from the pike level when the
>buffer is going to output data to the file descriptor in the basic
>set_buffered mode, which would make the feature somewhat problematic
>to use in that case, unless the pointers are objects.

That's why I don't use that, I use a callback and output it manually
at Pike level.
-- 
Stephen.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.