> > http://dev.iworks.at/PATCHES/imap_savebody.patch.txt > > Thanks a lot for review; the patch has been updated with your suggestions. > Additionally the whole thing is ifdef'd out in ZTS mode as the c-client > gets function is a global variable. I tested the function with a 17M > message saving to a file as well to an already opened stream. > Getting there, but you can make it work for ZTS mode. Just create a proxy for the gets function which is always set, then have the proxy do a TSRMLS_FETCH() and examine an extension global (e.g. IMAPG(gets_mode) or whatever) to determine whether it's in savebody() and should shuttle to your new gets function, or if it's not in savebody() and should dispatch to the "original" method.
Come to that, might as well just make IMAPG(real_gets) as a dynamic function.... Not that I've looked at ext/imap enough to know what the role of gets is precisely. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php