New submission from jhl: Python 2.7.6 does not compile with readline 6.3 (rc1). It looks like the RL_FUNCTION_TYPEDEF support in Modules/readline.c is not quite complete.
The following patch works for me, both for 2.7.6 and 3.3.3. --- a/Modules/readline.c 2013-11-10 18:36:41.000000000 +1100 +++ b/Modules/readline.c 2014-01-24 15:11:04.182417214 +1100 @@ -911,12 +911,27 @@ rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap); rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap); /* Set our hook functions */ - rl_startup_hook = (Function *)on_startup_hook; + rl_startup_hook = +#if defined(_RL_FUNCTION_TYPEDEF) + (rl_hook_func_t *)on_startup_hook; +#else + (Function *)on_startup_hook; +#endif #ifdef HAVE_RL_PRE_INPUT_HOOK - rl_pre_input_hook = (Function *)on_pre_input_hook; + rl_pre_input_hook = +#if defined(_RL_FUNCTION_TYPEDEF) + (rl_hook_func_t *)on_pre_input_hook; +#else + (Function *)on_pre_input_hook; +#endif #endif /* Set our completion function */ - rl_attempted_completion_function = (CPPFunction *)flex_complete; + rl_attempted_completion_function = +#if defined(_RL_FUNCTION_TYPEDEF) + (rl_completion_func_t *)flex_complete; +#else + (CPPFunction *)flex_complete; +#endif /* Set Python word break characters */ completer_word_break_characters = rl_completer_word_break_characters = ---------- components: Extension Modules messages: 209035 nosy: jhl priority: normal severity: normal status: open title: Failure to compile with readline-6.3-rc1 versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20374> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com