Project

General

Profile

Bug #6601 ยป readline.diff

applies cleanly on trunk and Backport93 - rctay (Tay Ray Chuan), 06/17/2012 05:23 PM

View differences:

ext/readline/readline.c
{
rb_io_t *ifp = 0;
VALUE c;
int ch;
if (!readline_instream) return rl_getc(input);
GetOpenFile(readline_instream, ifp);
if (rl_instream != ifp->stdio_file) return rl_getc(input);
......
#endif
c = rb_funcall(readline_instream, id_getbyte, 0, 0);
if (NIL_P(c)) return EOF;
return NUM2CHR(c);
ch = NUM2CHR(c);
if (RL_ISSTATE(RL_STATE_ISEARCH)
&& ch == ESC
/* interested in bytes only, actually */
&& rb_io_read_pending(ifp))
rl_execute_next(ESC);
return ch;
}
#elif defined HAVE_RL_EVENT_HOOK
#define BUSY_WAIT 0
    (1-1/1)