I was talking to someone on irc who was trying to speed up sockets - he
with a way to do it by modifying sysread() so that a new buffer doesn’t
have to be allocated on each call. (sped up sockets by 314x by his
However, he had to patch the Ruby source code to do this because he
able to access a macro (READ_DATA_BUFFERED) from his extenstion code.
out that the macro READ_DATA_BUFFERED is defined in io.c, so you can’t
from an extenstion.
So, I got to thinking that maybe #defines like that should go into .h
not .c files (maybe it should be #define’d in rubyio.h) so that they are
accessable in extenstions.
Would it be possible to move some of them to .h files for 1.8.5 (or at