Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed building 1.9 readline C-ext, again, hopefully.

  • Loading branch information...
commit fe70461cc771e8f3249aa264539b21ea321c39b7 1 parent c21fec4
@brixen brixen authored
View
2  Rakefile
@@ -33,7 +33,7 @@ end
require config_rb
BUILD_CONFIG = Rubinius::BUILD_CONFIG
-unless BUILD_CONFIG[:config_version] == 139
+unless BUILD_CONFIG[:config_version] == 140
STDERR.puts "Your configuration is outdated, please run ./configure first"
exit 1
end
View
3  configure
@@ -114,7 +114,7 @@ class Configure
@libversion = "2.0"
@version = "#{@libversion}.0dev"
@release_date = "yyyy-mm-dd"
- @config_version = 139
+ @config_version = 140
# TODO: add conditionals for platforms
if RbConfig::CONFIG["build_os"] =~ /darwin/
@@ -996,6 +996,7 @@ module Rubinius
:version_list => #{@version_list.inspect},
:default_version => "#{@default_version}",
:vendor_zlib => #{@vendor_zlib},
+ :readline => :#{@rb_readline ? :rb_readline : :c_readline}
}
end
EOC
View
4 lib/19/readline/ext/readline.c
@@ -124,9 +124,7 @@ readline_getc(FILE *input)
{
rb_io_t *ifp = 0;
VALUE c;
- if (!readline_instream) return rl_getc(input);
GetOpenFile(readline_instream, ifp);
- if (rl_instream != rb_io_stdio_file(ifp)) return rl_getc(input);
c = rb_funcall(readline_instream, id_getbyte, 0, 0);
if (NIL_P(c)) return EOF;
return NUM2CHR(c);
@@ -1554,7 +1552,7 @@ Init_readline()
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined HAVE_RL_GETC_FUNCTION
rl_getc_function = readline_getc;
- id_getbyte = rb_intern_const("getbyte");
+ id_getbyte = rb_intern("getbyte");
#elif defined HAVE_RL_EVENT_HOOK
rl_event_hook = readline_event;
#endif
View
2  rakelib/extensions.rake
@@ -124,7 +124,7 @@ compile_ext "melbourne", :task => "rbx", :doc => "for Rubinius"
compile_ext "melbourne", :task => "build", :doc => "for bootstrapping"
compile_ext "nkf"
-if BUILD_CONFIG[:defines].include? "HAS_READLINE"
+if BUILD_CONFIG[:readline] == :c_readline
compile_ext "readline", :dir => "lib/18/readline/ext"
compile_ext "readline", :dir => "lib/19/readline/ext",
:deps => ["Makefile", "extconf.rb"],
View
3  vm/capi/19/include/ruby/ruby.h
@@ -1522,6 +1522,9 @@ VALUE rb_uint2big(unsigned long number);
/** Returns a String in locale encoding. */
VALUE rb_locale_str_new_cstr(const char* string);
+ /** Returns a String in locale encoding. */
+ VALUE rb_locale_str_new(const char* string, long len);
+
/** Returns a pointer to a persistent char [] that contains the same data as
* that contained in the Ruby string. The buffer is flushed to the string
* when control returns to Ruby code. The buffer is updated with the string
View
5 vm/capi/string19.cpp
@@ -36,6 +36,11 @@ extern "C" {
return rb_str_new2(ptr);
}
+ VALUE rb_locale_str_new(const char* ptr, long len) {
+ // TODO
+ return rb_str_new(ptr, len);
+ }
+
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to) {
// TODO
return str;
Please sign in to comment.
Something went wrong with that request. Please try again.