ruby-changes:5682
From: shyouhei <ko1@a...>
Date: Sun, 15 Jun 2008 19:50:09 +0900 (JST)
Subject: [ruby-changes:5682] Ruby:r17188 (ruby_1_8_5): merge revision(s) 15546:
shyouhei 2008-06-15 19:49:57 +0900 (Sun, 15 Jun 2008)
New Revision: 17188
Modified files:
branches/ruby_1_8_5/ChangeLog
branches/ruby_1_8_5/ext/readline/readline.c
branches/ruby_1_8_5/version.h
Log:
merge revision(s) 15546:
* ext/readline/readline.c (readline_event): prevent polling. based on
a patch from error errorsson in [ruby-Bugs-17675].
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ext/readline/readline.c?r1=17188&r2=17187&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/version.h?r1=17188&r2=17187&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ChangeLog?r1=17188&r2=17187&diff_format=u
Index: ruby_1_8_5/ext/readline/readline.c
===================================================================
--- ruby_1_8_5/ext/readline/readline.c (revision 17187)
+++ ruby_1_8_5/ext/readline/readline.c (revision 17188)
@@ -38,17 +38,32 @@
# define rl_completion_matches completion_matches
#endif
-static int readline_event(void);
static char **readline_attempted_completion_function(const char *text,
int start, int end);
+#ifdef HAVE_RL_EVENT_HOOK
+#ifdef DOSISH
+#define BUSY_WAIT 1
+#else
+#define BUSY_WAIT 0
+#endif
+
+static int readline_event(void);
static int
readline_event()
{
- CHECK_INTS;
+#if BUSY_WAIT
rb_thread_schedule();
+#else
+ fd_set rset;
+
+ FD_ZERO(&rset);
+ FD_SET(fileno(rl_instream), &rset);
+ rb_thread_select(fileno(rl_instream) + 1, &rset, NULL, NULL, NULL);
return 0;
+#endif
}
+#endif
static VALUE
readline_readline(argc, argv, self)
Index: ruby_1_8_5/ChangeLog
===================================================================
--- ruby_1_8_5/ChangeLog (revision 17187)
+++ ruby_1_8_5/ChangeLog (revision 17188)
@@ -1,3 +1,8 @@
+Sun Jun 15 19:49:10 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * ext/readline/readline.c (readline_event): prevent polling. based on
+ a patch from error errorsson in [ruby-Bugs-17675].
+
Sun Jun 15 19:24:42 2008 Nobuyoshi Nakada <nobu@r...>
* parse.y (yycompile): clear ruby_eval_tree_begin if parse failed.
Index: ruby_1_8_5/version.h
===================================================================
--- ruby_1_8_5/version.h (revision 17187)
+++ ruby_1_8_5/version.h (revision 17188)
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 180
+#define RUBY_PATCHLEVEL 181
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/