summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-17 05:41:27 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-17 05:41:27 +0000
commite07677d30835819be5733ac53c118879ea10ac1b (patch)
treef371f93ec4080b69b6119ba69dfd30f7b0799e6f /ext
parent457e29ad1416fe2365a23a3bada569f9e02d50c3 (diff)
* ext/dbm/dbm.c (each_pair): add prototype to avoid VC++ warnings.
* ext/readline/readline.c (Init_readline): follow readline 4.2 prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dbm/dbm.c2
-rw-r--r--ext/readline/readline.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index ad84589640..6eb7cfcd20 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -405,6 +405,8 @@ fdbm_invert(obj)
return hash;
}
+static VALUE each_pair _((VALUE));
+
static VALUE
each_pair(obj)
VALUE obj;
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 8446a8cb46..b72da75e7f 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -729,8 +729,14 @@ Init_readline()
rb_str_new2("2.0 or before version"));
#endif
+#if defined READLINE_42_OR_LATER
+ rl_attempted_completion_function
+ = (rl_completion_func_t *)readline_attempted_completion_function;
+ rl_event_hook = (rl_hook_func_t *)readline_event;
+#else
rl_attempted_completion_function
= (CPPFunction *) readline_attempted_completion_function;
rl_event_hook = readline_event;
+#endif
rl_clear_signals();
}