in reply to Configurable IO buffersize?
The transformation to setvbuf would be similar, but, i'll let you work out the logic :)void setbuf(handle, ...) OutputStream handle CODE: if (handle) #ifdef PERLIO_IS_STDIO { char *buf = items == 2 && SvPOK(ST(1)) ? sv_grow(ST(1), BUFSIZ) : 0; setbuf(handle, buf); } #else { /* not_here("IO::Handle::setbuf"); */ PerlIOBuf * const b = PerlIOSelf(f, PerlIOBuf); PERL_UNUSED_CONTEXT; if(items == 2 && SvPOK(ST(1)) ) { b->bufsiz = SvLEN(ST(1)); Newxz(b->buf, b->bufsiz , STDCHAR); } } #endif
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Configurable IO buffersize?
by BrowserUk (Patriarch) on Aug 02, 2011 at 02:43 UTC | |
by Anonymous Monk on Aug 02, 2011 at 11:15 UTC | |
by Anonymous Monk on Aug 02, 2011 at 13:44 UTC | |
by BrowserUk (Patriarch) on Aug 02, 2011 at 11:21 UTC | |
by Anonymous Monk on Aug 02, 2011 at 12:27 UTC | |
by Anonymous Monk on Aug 02, 2011 at 02:50 UTC |