components/python/python26/patches/Python26-41.readline.patch
changeset 5028 db8ff415ba49
parent 5027 c71f34180df2
child 5029 77413b29eb5a
equal deleted inserted replaced
5027:c71f34180df2 5028:db8ff415ba49
     1 Ported from 2.7, to deal with readline upgrade.
       
     2 
       
     3 --- Python-2.6.8/Modules/readline.c.~1~	2012-04-10 08:32:10.000000000 -0700
       
     4 +++ Python-2.6.8/Modules/readline.c	2015-07-30 06:43:44.942800226 -0700
       
     5 @@ -801,7 +801,7 @@
       
     6   * before calling the normal completer */
       
     7  
       
     8  static char **
       
     9 -flex_complete(char *text, int start, int end)
       
    10 +flex_complete(const char *text, int start, int end)
       
    11  {
       
    12  #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
       
    13      rl_completion_append_character ='\0';
       
    14 @@ -841,12 +841,12 @@
       
    15      rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
       
    16      rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
       
    17      /* Set our hook functions */
       
    18 -    rl_startup_hook = (Function *)on_startup_hook;
       
    19 +    rl_startup_hook = on_startup_hook;
       
    20  #ifdef HAVE_RL_PRE_INPUT_HOOK
       
    21 -    rl_pre_input_hook = (Function *)on_pre_input_hook;
       
    22 +    rl_pre_input_hook = on_pre_input_hook;
       
    23  #endif
       
    24      /* Set our completion function */
       
    25 -    rl_attempted_completion_function = (CPPFunction *)flex_complete;
       
    26 +    rl_attempted_completion_function = flex_complete;
       
    27      /* Set Python word break characters */
       
    28      rl_completer_word_break_characters =
       
    29          strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");