<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[2069] MacRuby/branches/experimental</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.macosforge.org/projects/ruby/changeset/2069">2069</a></dd>
<dt>Author</dt> <dd>pthomson@apple.com</dd>
<dt>Date</dt> <dd>2009-07-24 14:23:13 -0700 (Fri, 24 Jul 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Got readline to work, though it breaks irb.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#MacRubybranchesexperimentalextreadlineextconfrb">MacRuby/branches/experimental/ext/readline/extconf.rb</a></li>
<li><a href="#MacRubybranchesexperimentalextreadlinereadlinec">MacRuby/branches/experimental/ext/readline/readline.c</a></li>
<li><a href="#MacRubybranchesexperimentalrakelibbuilderrake">MacRuby/branches/experimental/rakelib/builder.rake</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="MacRubybranchesexperimentalextreadlineextconfrb"></a>
<div class="modfile"><h4>Modified: MacRuby/branches/experimental/ext/readline/extconf.rb (2068 => 2069)</h4>
<pre class="diff"><span>
<span class="info">--- MacRuby/branches/experimental/ext/readline/extconf.rb        2009-07-24 05:23:19 UTC (rev 2068)
+++ MacRuby/branches/experimental/ext/readline/extconf.rb        2009-07-24 21:23:13 UTC (rev 2069)
</span><span class="lines">@@ -15,36 +15,40 @@
</span><span class="cx"> return have_var(var, $readline_headers)
</span><span class="cx"> end
</span><span class="cx">
</span><ins>+def have_readline_func(func)
+ return have_func(func, $readline_headers)
+end
+
</ins><span class="cx"> dir_config('curses')
</span><span class="cx"> dir_config('ncurses')
</span><span class="cx"> dir_config('termcap')
</span><span class="cx"> dir_config("readline")
</span><del>-enable_libedit = enable_config("libedit")
</del><ins>+enable_libedit = true
</ins><span class="cx"> have_library("user32", nil) if /cygwin/ === RUBY_PLATFORM
</span><del>-have_library("ncurses", "tgetnum") ||
- have_library("termcap", "tgetnum") ||
- have_library("curses", "tgetnum")
</del><ins>+have_library("ncurses") ||
+ have_library("termcap") ||
+ have_library("curses")
</ins><span class="cx">
</span><span class="cx"> if enable_libedit
</span><span class="cx"> unless (have_readline_header("editline/readline.h") ||
</span><span class="cx"> have_readline_header("readline/readline.h")) &&
</span><del>- have_library("edit", "readline")
</del><ins>+ have_library("edit")
</ins><span class="cx"> exit
</span><span class="cx"> end
</span><span class="cx"> else
</span><span class="cx"> unless ((have_readline_header("readline/readline.h") &&
</span><span class="cx"> have_readline_header("readline/history.h")) &&
</span><del>- (have_library("readline", "readline") ||
- have_library("edit", "readline"))) ||
</del><ins>+ (have_library("readline") ||
+ have_library("edit"))) ||
</ins><span class="cx"> (have_readline_header("editline/readline.h") &&
</span><del>- have_library("edit", "readline"))
</del><ins>+ have_library("edit"))
</ins><span class="cx"> exit
</span><span class="cx"> end
</span><span class="cx"> end
</span><span class="cx">
</span><del>-have_func("rl_filename_completion_function")
-have_func("rl_username_completion_function")
-have_func("rl_completion_matches")
</del><ins>+have_readline_func("rl_filename_completion_function")
+have_readline_func("username_completion_function")
+have_readline_func("rl_completion_matches")
</ins><span class="cx"> have_readline_var("rl_deprep_term_function")
</span><span class="cx"> have_readline_var("rl_completion_append_character")
</span><span class="cx"> have_readline_var("rl_basic_word_break_characters")
</span><span class="lines">@@ -55,11 +59,11 @@
</span><span class="cx"> have_readline_var("rl_attempted_completion_over")
</span><span class="cx"> have_readline_var("rl_library_version")
</span><span class="cx"> # workaround for native windows.
</span><del>-/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_event_hook")
-have_func("rl_cleanup_after_signal")
-have_func("rl_clear_signals")
-have_func("rl_vi_editing_mode")
-have_func("rl_emacs_editing_mode")
-have_func("replace_history_entry")
-have_func("remove_history")
</del><ins>+#/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_event_hook")
+have_readline_func("rl_cleanup_after_signal")
+have_readline_func("rl_clear_signals")
+have_readline_func("rl_vi_editing_mode")
+have_readline_func("rl_emacs_editing_mode")
+have_readline_func("replace_history_entry")
+have_readline_func("remove_history")
</ins><span class="cx"> create_makefile("readline")
</span></span></pre></div>
<a id="MacRubybranchesexperimentalextreadlinereadlinec"></a>
<div class="modfile"><h4>Modified: MacRuby/branches/experimental/ext/readline/readline.c (2068 => 2069)</h4>
<pre class="diff"><span>
<span class="info">--- MacRuby/branches/experimental/ext/readline/readline.c        2009-07-24 05:23:19 UTC (rev 2068)
+++ MacRuby/branches/experimental/ext/readline/readline.c        2009-07-24 21:23:13 UTC (rev 2069)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> #include <editline/readline.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#include "ruby/ruby.h"
</del><ins>+#include "ruby.h"
</ins><span class="cx"> #include "ruby/io.h"
</span><span class="cx"> #include "ruby/signal.h"
</span><span class="cx">
</span><span class="lines">@@ -27,6 +27,10 @@
</span><span class="cx"> #include <unistd.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#ifndef GetOpenFile
+#define GetOpenFile(obj, var) var = RFILE(rb_io_taint_check(obj))->fptr
+#endif
+
</ins><span class="cx"> #if WITH_OBJC
</span><span class="cx"> /* We cannot use the GC memory functions here because the underlying libedit
</span><span class="cx"> * function will call free() on the memory, resulting in a leak.
</span><span class="lines">@@ -78,7 +82,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_readline(int argc, VALUE *argv, VALUE self)
</del><ins>+readline_readline(VALUE self, SEL sel, int argc, VALUE *argv)
</ins><span class="cx"> {
</span><span class="cx"> VALUE tmp, add_hist, result;
</span><span class="cx"> const char *prompt = NULL;
</span><span class="lines">@@ -126,31 +130,31 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_input(VALUE self, VALUE input)
</del><ins>+readline_s_set_input(VALUE self, SEL sel, VALUE input)
</ins><span class="cx"> {
</span><span class="cx"> rb_io_t *ifp;
</span><span class="cx">
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> Check_Type(input, T_FILE);
</span><span class="cx"> GetOpenFile(input, ifp);
</span><del>- rl_instream = rb_io_stdio_file(ifp);
</del><ins>+ rl_instream = fdopen(ifp->fd, "r+");
</ins><span class="cx"> return input;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_output(VALUE self, VALUE output)
</del><ins>+readline_s_set_output(VALUE self, SEL sel, VALUE output)
</ins><span class="cx"> {
</span><span class="cx"> rb_io_t *ofp;
</span><span class="cx">
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> Check_Type(output, T_FILE);
</span><span class="cx"> GetOpenFile(output, ofp);
</span><del>- rl_outstream = rb_io_stdio_file(ofp);
</del><ins>+ rl_outstream = fdopen(ofp->fd, "w+");
</ins><span class="cx"> return output;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_completion_proc(VALUE self, VALUE proc)
</del><ins>+readline_s_set_completion_proc(VALUE self, SEL sel, VALUE proc)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> if (!rb_respond_to(proc, rb_intern("call")))
</span><span class="lines">@@ -159,21 +163,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_completion_proc(VALUE self)
</del><ins>+readline_s_get_completion_proc(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> return rb_attr_get(mReadline, completion_proc);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_completion_case_fold(VALUE self, VALUE val)
</del><ins>+readline_s_set_completion_case_fold(VALUE self, SEL sel, VALUE val)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> return rb_ivar_set(mReadline, completion_case_fold, val);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_completion_case_fold(VALUE self)
</del><ins>+readline_s_get_completion_case_fold(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> return rb_attr_get(mReadline, completion_case_fold);
</span><span class="lines">@@ -244,7 +248,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_vi_editing_mode(VALUE self)
</del><ins>+readline_s_vi_editing_mode(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_VI_EDITING_MODE
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -257,7 +261,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_emacs_editing_mode(VALUE self)
</del><ins>+readline_s_emacs_editing_mode(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_EMACS_EDITING_MODE
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -270,7 +274,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_completion_append_character(VALUE self, VALUE str)
</del><ins>+readline_s_set_completion_append_character(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -293,7 +297,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_completion_append_character(VALUE self)
</del><ins>+readline_s_get_completion_append_character(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
</span><span class="cx"> VALUE str;
</span><span class="lines">@@ -311,7 +315,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_basic_word_break_characters(VALUE self, VALUE str)
</del><ins>+readline_s_set_basic_word_break_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
</span><span class="cx"> static char *basic_word_break_characters = NULL;
</span><span class="lines">@@ -337,7 +341,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_basic_word_break_characters(VALUE self, VALUE str)
</del><ins>+readline_s_get_basic_word_break_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -351,7 +355,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_completer_word_break_characters(VALUE self, VALUE str)
</del><ins>+readline_s_set_completer_word_break_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
</span><span class="cx"> static char *completer_word_break_characters = NULL;
</span><span class="lines">@@ -377,7 +381,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_completer_word_break_characters(VALUE self, VALUE str)
</del><ins>+readline_s_get_completer_word_break_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -391,7 +395,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_basic_quote_characters(VALUE self, VALUE str)
</del><ins>+readline_s_set_basic_quote_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
</span><span class="cx"> static char *basic_quote_characters = NULL;
</span><span class="lines">@@ -418,7 +422,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_basic_quote_characters(VALUE self, VALUE str)
</del><ins>+readline_s_get_basic_quote_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -432,7 +436,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_completer_quote_characters(VALUE self, VALUE str)
</del><ins>+readline_s_set_completer_quote_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
</span><span class="cx"> static char *completer_quote_characters = NULL;
</span><span class="lines">@@ -458,7 +462,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_completer_quote_characters(VALUE self, VALUE str)
</del><ins>+readline_s_get_completer_quote_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -472,7 +476,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_set_filename_quote_characters(VALUE self, VALUE str)
</del><ins>+readline_s_set_filename_quote_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
</span><span class="cx"> static char *filename_quote_characters = NULL;
</span><span class="lines">@@ -498,7 +502,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-readline_s_get_filename_quote_characters(VALUE self, VALUE str)
</del><ins>+readline_s_get_filename_quote_characters(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
</span><span class="cx"> rb_secure(4);
</span><span class="lines">@@ -512,13 +516,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_to_s(VALUE self)
</del><ins>+hist_to_s(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> return rb_str_new2("HISTORY");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_get(VALUE self, VALUE index)
</del><ins>+hist_get(VALUE self, SEL sel, VALUE index)
</ins><span class="cx"> {
</span><span class="cx"> HIST_ENTRY *entry;
</span><span class="cx"> int i;
</span><span class="lines">@@ -536,7 +540,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_set(VALUE self, VALUE index, VALUE str)
</del><ins>+hist_set(VALUE self, SEL sel, VALUE index, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> #ifdef HAVE_REPLACE_HISTORY_ENTRY
</span><span class="cx"> HIST_ENTRY *entry;
</span><span class="lines">@@ -560,7 +564,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_push(VALUE self, VALUE str)
</del><ins>+hist_push(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> SafeStringValue(str);
</span><span class="lines">@@ -569,7 +573,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_push_method(int argc, VALUE *argv, VALUE self)
</del><ins>+hist_push_method(VALUE self, SEL sel, int argc, VALUE *argv)
</ins><span class="cx"> {
</span><span class="cx"> VALUE str;
</span><span class="cx">
</span><span class="lines">@@ -605,7 +609,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_pop(VALUE self)
</del><ins>+hist_pop(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> if (history_length > 0) {
</span><span class="lines">@@ -616,7 +620,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_shift(VALUE self)
</del><ins>+hist_shift(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> if (history_length > 0) {
</span><span class="lines">@@ -627,7 +631,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_each(VALUE self)
</del><ins>+hist_each(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> HIST_ENTRY *entry;
</span><span class="cx"> int i;
</span><span class="lines">@@ -645,21 +649,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_length(VALUE self)
</del><ins>+hist_length(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> return INT2NUM(history_length);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_empty_p(VALUE self)
</del><ins>+hist_empty_p(VALUE self, SEL sel)
</ins><span class="cx"> {
</span><span class="cx"> rb_secure(4);
</span><span class="cx"> return history_length == 0 ? Qtrue : Qfalse;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-hist_delete_at(VALUE self, VALUE index)
</del><ins>+hist_delete_at(VALUE self, SEL sel, VALUE index)
</ins><span class="cx"> {
</span><span class="cx"> int i;
</span><span class="cx">
</span><span class="lines">@@ -674,7 +678,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-filename_completion_proc_call(VALUE self, VALUE str)
</del><ins>+filename_completion_proc_call(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> VALUE result;
</span><span class="cx"> char **matches;
</span><span class="lines">@@ -699,7 +703,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span><del>-username_completion_proc_call(VALUE self, VALUE str)
</del><ins>+username_completion_proc_call(VALUE self, SEL sel, VALUE str)
</ins><span class="cx"> {
</span><span class="cx"> VALUE result;
</span><span class="cx"> char **matches;
</span><span class="lines">@@ -737,72 +741,72 @@
</span><span class="cx"> completion_case_fold = rb_intern(COMPLETION_CASE_FOLD);
</span><span class="cx">
</span><span class="cx"> mReadline = rb_define_module("Readline");
</span><del>- rb_define_module_function(mReadline, "readline",
</del><ins>+ rb_objc_define_method(mReadline, "readline",
</ins><span class="cx">                          readline_readline, -1);
</span><del>- rb_define_singleton_method(mReadline, "input=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "input=",
</ins><span class="cx">                          readline_s_set_input, 1);
</span><del>- rb_define_singleton_method(mReadline, "output=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "output=",
</ins><span class="cx">                          readline_s_set_output, 1);
</span><del>- rb_define_singleton_method(mReadline, "completion_proc=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completion_proc=",
</ins><span class="cx">                          readline_s_set_completion_proc, 1);
</span><del>- rb_define_singleton_method(mReadline, "completion_proc",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completion_proc",
</ins><span class="cx">                          readline_s_get_completion_proc, 0);
</span><del>- rb_define_singleton_method(mReadline, "completion_case_fold=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completion_case_fold=",
</ins><span class="cx">                          readline_s_set_completion_case_fold, 1);
</span><del>- rb_define_singleton_method(mReadline, "completion_case_fold",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completion_case_fold",
</ins><span class="cx">                          readline_s_get_completion_case_fold, 0);
</span><del>- rb_define_singleton_method(mReadline, "vi_editing_mode",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "vi_editing_mode",
</ins><span class="cx">                          readline_s_vi_editing_mode, 0);
</span><del>- rb_define_singleton_method(mReadline, "emacs_editing_mode",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "emacs_editing_mode",
</ins><span class="cx">                          readline_s_emacs_editing_mode, 0);
</span><del>- rb_define_singleton_method(mReadline, "completion_append_character=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completion_append_character=",
</ins><span class="cx">                          readline_s_set_completion_append_character, 1);
</span><del>- rb_define_singleton_method(mReadline, "completion_append_character",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completion_append_character",
</ins><span class="cx">                          readline_s_get_completion_append_character, 0);
</span><del>- rb_define_singleton_method(mReadline, "basic_word_break_characters=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "basic_word_break_characters=",
</ins><span class="cx">                          readline_s_set_basic_word_break_characters, 1);
</span><del>- rb_define_singleton_method(mReadline, "basic_word_break_characters",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "basic_word_break_characters",
</ins><span class="cx">                          readline_s_get_basic_word_break_characters, 0);
</span><del>- rb_define_singleton_method(mReadline, "completer_word_break_characters=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completer_word_break_characters=",
</ins><span class="cx">                          readline_s_set_completer_word_break_characters, 1);
</span><del>- rb_define_singleton_method(mReadline, "completer_word_break_characters",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completer_word_break_characters",
</ins><span class="cx">                          readline_s_get_completer_word_break_characters, 0);
</span><del>- rb_define_singleton_method(mReadline, "basic_quote_characters=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "basic_quote_characters=",
</ins><span class="cx">                          readline_s_set_basic_quote_characters, 1);
</span><del>- rb_define_singleton_method(mReadline, "basic_quote_characters",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "basic_quote_characters",
</ins><span class="cx">                          readline_s_get_basic_quote_characters, 0);
</span><del>- rb_define_singleton_method(mReadline, "completer_quote_characters=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completer_quote_characters=",
</ins><span class="cx">                          readline_s_set_completer_quote_characters, 1);
</span><del>- rb_define_singleton_method(mReadline, "completer_quote_characters",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "completer_quote_characters",
</ins><span class="cx">                          readline_s_get_completer_quote_characters, 0);
</span><del>- rb_define_singleton_method(mReadline, "filename_quote_characters=",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "filename_quote_characters=",
</ins><span class="cx">                          readline_s_set_filename_quote_characters, 1);
</span><del>- rb_define_singleton_method(mReadline, "filename_quote_characters",
</del><ins>+ rb_objc_define_method(*(VALUE *)mReadline, "filename_quote_characters",
</ins><span class="cx">                          readline_s_get_filename_quote_characters, 0);
</span><span class="cx">
</span><span class="cx"> history = rb_obj_alloc(rb_cObject);
</span><span class="cx"> rb_extend_object(history, rb_mEnumerable);
</span><del>- rb_define_singleton_method(history,"to_s", hist_to_s, 0);
- rb_define_singleton_method(history,"[]", hist_get, 1);
- rb_define_singleton_method(history,"[]=", hist_set, 2);
- rb_define_singleton_method(history,"<<", hist_push, 1);
- rb_define_singleton_method(history,"push", hist_push_method, -1);
- rb_define_singleton_method(history,"pop", hist_pop, 0);
- rb_define_singleton_method(history,"shift", hist_shift, 0);
- rb_define_singleton_method(history,"each", hist_each, 0);
- rb_define_singleton_method(history,"length", hist_length, 0);
- rb_define_singleton_method(history,"size", hist_length, 0);
- rb_define_singleton_method(history,"empty?", hist_empty_p, 0);
- rb_define_singleton_method(history,"delete_at", hist_delete_at, 1);
</del><ins>+ rb_objc_define_method(*(VALUE *)history, "to_s", hist_to_s, 0);
+ rb_objc_define_method(*(VALUE *)history, "[]", hist_get, 1);
+ rb_objc_define_method(*(VALUE *)history, "[]=", hist_set, 2);
+ rb_objc_define_method(*(VALUE *)history, "<<", hist_push, 1);
+ rb_objc_define_method(*(VALUE *)history, "push", hist_push_method, -1);
+ rb_objc_define_method(*(VALUE *)history, "pop", hist_pop, 0);
+ rb_objc_define_method(*(VALUE *)history, "shift", hist_shift, 0);
+ rb_objc_define_method(*(VALUE *)history, "each", hist_each, 0);
+ rb_objc_define_method(*(VALUE *)history, "length", hist_length, 0);
+ rb_objc_define_method(*(VALUE *)history, "size", hist_length, 0);
+ rb_objc_define_method(*(VALUE *)history, "empty?", hist_empty_p, 0);
+ rb_objc_define_method(*(VALUE *)history, "delete_at", hist_delete_at, 1);
</ins><span class="cx"> rb_define_const(mReadline, "HISTORY", history);
</span><span class="cx">
</span><span class="cx"> fcomp = rb_obj_alloc(rb_cObject);
</span><del>- rb_define_singleton_method(fcomp, "call",
</del><ins>+ rb_objc_define_method(*(VALUE *)fcomp, "call",
</ins><span class="cx">                          filename_completion_proc_call, 1);
</span><span class="cx"> rb_define_const(mReadline, "FILENAME_COMPLETION_PROC", fcomp);
</span><span class="cx">
</span><span class="cx"> ucomp = rb_obj_alloc(rb_cObject);
</span><del>- rb_define_singleton_method(ucomp, "call",
</del><ins>+ rb_objc_define_method(*(VALUE *)ucomp, "call",
</ins><span class="cx">                          username_completion_proc_call, 1);
</span><span class="cx"> rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
</span><span class="cx"> #if defined HAVE_RL_LIBRARY_VERSION
</span></span></pre></div>
<a id="MacRubybranchesexperimentalrakelibbuilderrake"></a>
<div class="modfile"><h4>Modified: MacRuby/branches/experimental/rakelib/builder.rake (2068 => 2069)</h4>
<pre class="diff"><span>
<span class="info">--- MacRuby/branches/experimental/rakelib/builder.rake        2009-07-24 05:23:19 UTC (rev 2068)
+++ MacRuby/branches/experimental/rakelib/builder.rake        2009-07-24 21:23:13 UTC (rev 2069)
</span><span class="lines">@@ -312,7 +312,7 @@
</span><span class="cx"> EXTMK_ARGS = "#{SCRIPT_ARGS} --extension --extstatic"
</span><span class="cx"> INSTRUBY_ARGS = "#{SCRIPT_ARGS} --data-mode=0644 --prog-mode=0755 --installed-list #{INSTALLED_LIST} --mantype=\"doc\" --sym-dest-dir=\"#{SYM_INSTDIR}\""
</span><span class="cx">
</span><del>-EXTENSIONS = ['ripper', 'digest']
</del><ins>+EXTENSIONS = ['ripper', 'digest', 'readline']
</ins><span class="cx"> def perform_extensions_target(target)
</span><span class="cx"> EXTENSIONS.map { |x| File.join('ext', x) }.each do |ext_dir|
</span><span class="cx"> Dir.glob(File.join(ext_dir, '**/extconf.rb')) do |p|
</span></span></pre>
</div>
</div>
</body>
</html>