ruby-changes:44692
From: nobu <ko1@a...>
Date: Sun, 13 Nov 2016 11:11:12 +0900 (JST)
Subject: [ruby-changes:44692] nobu:r56765 (trunk): readline: remove dependency on internal.h
nobu 2016-11-13 11:11:07 +0900 (Sun, 13 Nov 2016) New Revision: 56765 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56765 Log: readline: remove dependency on internal.h * ext/readline/depend: remove dependency on internal.h. * ext/readline/readline.c (readline_s_delete_text): use rb_enc_str_new_static instead of rb_setup_fake_str not to depend on internal.h. Modified files: trunk/ext/readline/depend trunk/ext/readline/readline.c Index: ext/readline/depend =================================================================== --- ext/readline/depend (revision 56764) +++ ext/readline/depend (revision 56765) @@ -13,6 +13,5 @@ readline.o: $(hdrdir)/ruby/st.h https://github.com/ruby/ruby/blob/trunk/ext/readline/depend#L13 readline.o: $(hdrdir)/ruby/subst.h readline.o: $(hdrdir)/ruby/thread.h readline.o: $(top_srcdir)/include/ruby.h -readline.o: $(top_srcdir)/internal.h readline.o: readline.c # AUTOGENERATED DEPENDENCIES END Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 56764) +++ ext/readline/readline.c (revision 56765) @@ -33,7 +33,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L33 #include <editline/readline.h> #endif -#include "internal.h" #include "ruby/io.h" #include "ruby/thread.h" @@ -706,8 +705,7 @@ readline_s_delete_text(int argc, VALUE * https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L705 if (rl_line_buffer) { char *p, *ptr = rl_line_buffer; long beg = 0, len = strlen(rl_line_buffer); - struct RString fakestr; - VALUE str = rb_setup_fake_str(&fakestr, ptr, len, rb_locale_encoding()); + VALUE str = rb_enc_str_new_static(ptr, len, rb_locale_encoding()); OBJ_FREEZE(str); if (argc == 2) { beg = NUM2LONG(argv[0]); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/