summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-13 02:11:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-13 02:11:07 +0000
commit48d5a921abbed10b2f003a6c44a681357b179aa2 (patch)
treed390c4f8596ca7162cfc5ea76de23d19f1869306 /ext/readline
parentffa371d9aa1af1f22c41063add9af3e4922f2f12 (diff)
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')
-rw-r--r--ext/readline/depend1
-rw-r--r--ext/readline/readline.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/ext/readline/depend b/ext/readline/depend
index eb05e65..8193282 100644
--- a/ext/readline/depend
+++ b/ext/readline/depend
@@ -13,6 +13,5 @@ readline.o: $(hdrdir)/ruby/st.h
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
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index b03f04d..6ed558e 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]);