summaryrefslogtreecommitdiff
path: root/ext/readline
AgeCommit message (Collapse)Author
2017-03-22ruby tool/update-deps --fixshyouhei
Onigumo 6 (r57045) introduced new onigumo.h header file, which is required from quite much everywhere. This commit adds necessary dependencies. Note: ruby/oniguruma.h now includes onigumo.h, ruby/io.h includes oniguruma.h, ruby/encoding.h also includes oniguruma.h, and internal.h includes encoding.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-07Fix up r57788, Function is removed at readline-6.3.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06Avoid to warning of clang with -Wincompatible-pointer-types.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06readline.c: fix waiting fucntionnobu
* ext/readline/readline.c (getc_body): use rb_w32_wait_events_blocking in block region. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04readline.c: fix typenobu
* ext/readline/readline.c (getc_body): fix variable type, and extract _get_osfhandle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17readline.c: str_subposnobu
* ext/readline/readline.c (str_subpos): make string instance only if necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-13readline: remove dependency on internal.hnobu
* 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
2016-10-06* ext/readline/extconf.rb: Update error message with correct words.hsbt
[fix GH-1453][ci skip] Patch by @magikid git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03use rb_locale_str_newnobu
* ext/readline/readline.c (readline_char_is_quoted): use rb_locale_str_new with the length. [Feature #12659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03rl_char_is_quoted_pnobu
* ext/readline/readline.c (readline_s_set_quoting_detection_proc): support rl_char_is_quoted_p. [Feature #12659] * ext/readline/readline.c (readline_s_get_quoting_detection_proc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03readline.c: mustbe_callablenobu
* ext/readline/readline.c (mustbe_callable): extract to check a given argument to be callable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30* ext/readline/extconf.rb: call dir_config("libedit")naruse
if --enable-libedit is spcified. [Bug #11751] patched by John Hein git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-05ext: use RARRAY_AREFnobu
* ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. pointed out by hanmac. https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-04ext: use RARRAY_CONST_PTRnobu
* ext/bigdecimal/bigdecimal.c: use RARRAY_CONST_PTR just fore reference instead of RARRAY_PTR, to keep the array WB-protected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-08pass saved errnonobu
* ext/socket/socket.c (socket_s_ip_address_list): pass saved errno to rb_syserr_fail. * ext/readline/readline.c (readline_getc, readline_s_set_input), (readline_s_set_output): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14readline.c: initialize before rl_refresh_linenobu
* ext/readline/readline.c (readline_s_refresh_line): initialize before rl_refresh_line(), as some function make the internal state non-clean but rl_refresh_line() does not re-initialize it. [ruby-core:43957] [Bug #6232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21Update dependency.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* internal.h: Include ruby.h and ruby/encoding.h to beakr
includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15Mark auogenerated part.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* common.mk: Remove comments in Dependency lines.akr
Notified by usa. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* tool/update-deps: Extend to fix dependencies.akr
* common.mk: Dependencies updated by tool/update-deps. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12readline.c: use rb_setup_fake_strnobu
* ext/readline/readline.c (readline_s_delete_text): initialize a fake string by rb_setup_fake_str(). * internal.h (rb_setup_fake_str): allow extensions to call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-04readline/extconf.rb: rl_hook_func_tnobu
* ext/readline/extconf.rb (rl_hook_func_t): check pointer type. [ruby-dev:48089] [Bug #9702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-31readline/extconf.rb: fix typonobu
* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`. [ruby-core:61756] [Bug #9578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02A comment added.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02extconf.rb: rl_hook_func_t for old readlinenobu
* ext/readline/extconf.rb (rl_hook_func_t): define as Function for very old readline versions. [ruby-core:61209] [Bug #9578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01* ext/readline/readline.c (Init_readline): Use rl_hook_func_t insteadakr
of Function to support readline-6.3. (rl_hook_func_t is available since readline-4.2.) Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug #9578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* ext/readline/readline.c (readline_getc): Considerakr
NULL as input. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28* common.mk, ext/objspace/depend, ext/coverage/depend,akr
ext/-test-/debug/depend, ext/date/depend: Update dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27* ext/readline/readline.c: Include ruby/thread.h forakr
rb_thread_call_without_gvl2. (readline_rl_instream, readline_rl_outstream): Record FILE structures allocated by this extension. (getc_body): New function extracted from readline_getc. (getc_func): New function. (readline_getc): Use rb_thread_call_without_gvl2 to invoke getc_func. [ruby-dev:47033] [Bug #8749] (clear_rl_instream, clear_rl_outstream): Close FILE structure allocated by this extention reliably. [ruby-core:57951] [Bug #9040] (readline_readline): Use clear_rl_instream and clear_rl_outstream. (readline_s_set_input): Set readline_rl_instream. (readline_s_set_output): Set readline_rl_outstream. (Init_readline): Don't call readline_s_set_input because readline_getc doesn't block other threads for any FILE structure now. [ruby-dev:47033] [Bug #8749] reported by Nobuhiro IMAI. [ruby-core:57951] [Bug #9040] reporeted by Eamonn Webster. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18* error.c, object.c, ext/readline/README.ja: [DOC] $SAFE=4 is obsolete.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12fix r42527 again; [Bug #8760] [ruby-dev:47608] [ruby-dev:47609]naruse
Remove check rl_instream != ifp->stdio_file. rl_instream is made from duped fd and we cannnot compare. This fix seems still buggy when rl_instream is manually changed from other extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12refix r42525 set stdio_file only if stdionaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11* ext/readline/readline.c (readline_s_set_input): on OS X with editline,naruse
Readline.readline doesn't work because readline_get doesn't use rl_getc. The difference is introduced by r42402 [ruby-dev:47509] [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file. Therefore add manually setting the value. * ext/readline/readline.c (readline_s_set_onput): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* ext/readline/readline.c (insert_ignore_escape): suppressktsj
logical-op-parentheses warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c (readline_s_delete_text): removekouji
checking "$SAFE == 4". * ext/readline/readline.c: fix rdoc, remove "Raises SecurityError" and add "Raises NotImplementedError". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c, test/readline/test_readline.rb: fixkouji
indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c (readline_s_set_point, Init_readline):kouji
add Readline.point=(pos). Patched by naruse. [ruby-dev:47535] [Feature #8675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c (Init_readline, readline_s_set_output)kouji
(clear_rl_outstream, readline_s_set_input, clear_rl_instream) (readline_readline): fix causing SEGV if closed IO object that is set Readline.input or Readline.output. Patched by akr [ruby-dev:47509] [Bug #8644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22readline.c: $SAFE 4nobu
* ext/readline/readline.c (readline_s_delete_text): call rb_secure only if level 4 is allowed. otherwise do nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22readline.c: $SAFEnobu
* ext/readline/readline.c (readline_s_delete_text): $SAFE=4 is obsolete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22* ext/readline/readline.c (Init_readline): addedkouji
Readline.delete_text. [ruby-dev:45789] [Feature #6626] * ext/readline/extconf.rb: check for rl_delete_text() in Readline library. Thanks, Nobuyoshi Nakada, for the patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos. Patch by k_takata.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-07* ext/readline/readline.c (insert_ignore_escape): Add a cast toakr
unsigned char * before dereference. This suppress a warning on Cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e