mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-06 16:56:41 +08:00
Merge pull request #5 from coldtobi/fix_4_ancient_readline
Use rl_clear_history only if available, fallback to clear_history if not
This commit is contained in:
commit
cb502b8676
@ -917,6 +917,10 @@ void readline_exit(void)
|
|||||||
{
|
{
|
||||||
if (!quit)
|
if (!quit)
|
||||||
rl_callback_handler_remove();
|
rl_callback_handler_remove();
|
||||||
|
#if (RL_VERSION_MAJOR<=5 || (RL_VERSION_MAJOR==6 && RL_VERSION_MINOR<=3))
|
||||||
|
clear_history();
|
||||||
|
#else
|
||||||
rl_clear_history();
|
rl_clear_history();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user