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

"Per Hedbor () @ Pike (-) importm?te f?r mailinglistan" <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
> Since you would need to call three functions to do the same thing as
> the subbuffer call (get offset, get added size, update at first
> offset) the time offsets are 0.12 vs 0.20 s per 1M calls on my
> machine.

By the way, you can already do this:

int i = sizeof(buffer);
buffer->add_padding(4);
...
int l = sizeof(buffer)-i;
buffer[i] = l>>24;
buffer[i+1] = l>>16;
buffer[i+2] = l>>8;
buffer[i+3] = l>>8;

-- 
Per Hedbor
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.