Skip to content

Commit ccbe6f3

Browse files
committed
merge revision(s) r45225,r45240,r45488: [Backport ruby#9578] [Backport ruby#9630]
* ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead of Function to support readline-6.3. (rl_hook_func_t is available since readline-4.2.) Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug ruby#9578] * ext/readline/extconf.rb (rl_hook_func_t): define as Function for very old readline versions. [ruby-core:61209] [Bug ruby#9578] * ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`. [ruby-core:61756] [Bug ruby#9578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 3159b64 commit ccbe6f3

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

ChangeLog

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
Thu May 1 20:47:08 2014 Nobuyoshi Nakada <[email protected]>
2+
3+
* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
4+
[ruby-core:61756] [Bug #9578]
5+
6+
Thu May 1 20:47:08 2014 Nobuyoshi Nakada <[email protected]>
7+
8+
* ext/readline/extconf.rb (rl_hook_func_t): define as Function for
9+
very old readline versions. [ruby-core:61209] [Bug #9578]
10+
11+
Thu May 1 20:47:08 2014 Tanaka Akira <[email protected]>
12+
13+
* ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
14+
of Function to support readline-6.3. (rl_hook_func_t is available
15+
since readline-4.2.)
16+
Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug #9578]
17+
118
Sat Mar 1 21:00:27 2014 Marc-Andre Lafortune <[email protected]>
219

320
* proc.c: Having optional keyword arguments makes maximum arity +1,

ext/readline/extconf.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def readline.have_func(func)
1919
return super(func, headers)
2020
end
2121

22+
def readline.have_type(type)
23+
return super(type, headers)
24+
end
25+
2226
dir_config('curses')
2327
dir_config('ncurses')
2428
dir_config('termcap')
@@ -94,4 +98,8 @@ def readline.have_func(func)
9498
readline.have_func("rl_redisplay")
9599
readline.have_func("rl_insert_text")
96100
readline.have_func("rl_delete_text")
101+
unless readline.have_type("rl_hook_func_t")
102+
$defs << "-Drl_hook_func_t=Function"
103+
end
104+
97105
create_makefile("readline")

ext/readline/readline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@ Init_readline()
19741974

19751975
rl_attempted_completion_function = readline_attempted_completion_function;
19761976
#if defined(HAVE_RL_PRE_INPUT_HOOK)
1977-
rl_pre_input_hook = (Function *)readline_pre_input_hook;
1977+
rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
19781978
#endif
19791979
#ifdef HAVE_RL_CATCH_SIGNALS
19801980
rl_catch_signals = 0;

version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#define RUBY_VERSION "2.1.2"
2-
#define RUBY_RELEASE_DATE "2014-03-01"
3-
#define RUBY_PATCHLEVEL 80
2+
#define RUBY_RELEASE_DATE "2014-05-01"
3+
#define RUBY_PATCHLEVEL 81
44

55
#define RUBY_RELEASE_YEAR 2014
6-
#define RUBY_RELEASE_MONTH 3
6+
#define RUBY_RELEASE_MONTH 5
77
#define RUBY_RELEASE_DAY 1
88

99
#include "ruby/version.h"

0 commit comments

Comments
 (0)