Project

General

Profile

Backport #5539 ยป readline_comment.patch

nagachika (Tomoyuki Chikanaga), 11/08/2011 12:24 AM

View differences:

ext/readline/readline.c
1495 1495
    /* Allow conditional parsing of the ~/.inputrc file. */
1496 1496
    rl_readline_name = (char *)"Ruby";
1497 1497

  
1498
#if defined HAVE_RL_GETC_FUNCTION
1499
    /* libedit check rl_getc_function only when rl_initialize() is called, */
1500
    /* and using_history() call rl_initialize(). */
1501
    /* This assignment should be placed before using_history() */
1502
    rl_getc_function = readline_getc;
1503
    id_getbyte = rb_intern_const("getbyte");
1504
#elif defined HAVE_RL_EVENT_HOOK
1505
    rl_event_hook = readline_event;
1506
#endif
1507

  
1498 1508
    using_history();
1499 1509

  
1500 1510
    completion_proc = rb_intern(COMPLETION_PROC);
......
1640 1650
    rb_define_const(mReadline, "VERSION", version);
1641 1651

  
1642 1652
    rl_attempted_completion_function = readline_attempted_completion_function;
1643
#if defined HAVE_RL_GETC_FUNCTION
1644
    rl_getc_function = readline_getc;
1645
    id_getbyte = rb_intern_const("getbyte");
1646
#elif defined HAVE_RL_EVENT_HOOK
1647
    rl_event_hook = readline_event;
1648
#endif
1649 1653
#ifdef HAVE_RL_CATCH_SIGNALS
1650 1654
    rl_catch_signals = 0;
1651 1655
#endif