diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-13 02:11:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-13 02:11:07 +0000 |
commit | 48d5a921abbed10b2f003a6c44a681357b179aa2 (patch) | |
tree | d390c4f8596ca7162cfc5ea76de23d19f1869306 /ext/readline/readline.c | |
parent | ffa371d9aa1af1f22c41063add9af3e4922f2f12 (diff) | |
download | ruby-48d5a921abbed10b2f003a6c44a681357b179aa2.tar.gz |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline/readline.c')
-rw-r--r-- | ext/readline/readline.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index b03f04d2fa..6ed558e334 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -33,7 +33,6 @@ #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 *argv, VALUE self) 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]); |