aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* declare `rb_w32_sysinit` in header.usa2016-12-131-0/+1
| | | | | | | | | | * include/ruby/win32.h (rb_w32_sysinit): declare. [ruby-core:78444] [Bug #12994] * ruby.c (ruby_sysinit): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge Onigmo 6.0.0naruse2016-12-102-876/+938
| | | | | | | | | | | * https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY * fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78 * suppress warning: https://github.com/k-takata/Onigmo/pull/79 * include/ruby/oniguruma.h: include onigmo.h. * template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warning: this use of "defined" may not be portablenaruse2016-12-091-6/+9
| | | | | | | Use of defined() in macro expansion is considered non portable. https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01577.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: add prefixnobu2016-12-091-8/+10
| | | | | | | * include/ruby/ruby.h (RB_TEST, RB_NIL_P): prefix RB to get rid of name conflicts with other headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* switching hash removalnobu2016-12-061-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * st.h (struct st_hash_type): Remove strong_hash. (struct st_table): Remove inside_rebuild_p and curr_hash. * st.c (do_hash): Use type->hash instead of curr_hash. (make_tab_empty): Remove setting up curr_hash. (st_init_table_with_size): Remove setting up inside_rebuild_p. (rebuild_table): Remove clearing inside_rebuild_p. (reset_entry_hashes, HIT_THRESHOULD_FOR_STRONG_HASH): Remove code recognizing a denial attack and switching to strong hash. * hash.c (rb_dbl_long_hash, rb_objid_hash, rb_ident_hash): Use rb_hash_start to randomize the hash. (str_seed): Remove. (any_hash): Remove strong_p and use always rb_str_hash for strings. (any_hash_weak, rb_any_hash_weak): Remove. (st_hash_type objhash): Remove rb_any_hash_weak. based on the patch by Vladimir N Makarov <vmakarov@redhat.com> at [ruby-core:78490]. [Bug #13002] * test/ruby/test_hash.rb (test_wrapper): objects other than special constants should be able to be wrapped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert changes on rb_frame_method_id_and_class()ktsj2016-12-041-1/+1
| | | | | | | r56593 introduced backwards incompatible changes in the API. [ruby-core:78471] [Feature #12747] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use `rb_struct_ptr` for `RSTRUCT_PTR` macrousa2016-11-241-1/+1
| | | | | | | * include/ruby/ruby.h (RSTRUCT_PTR): at r55788, `rb_struct_const_ptr` had been hidden and `rb_struct_ptr` had been implemented for backward compatiblity. but the definition of `RSTRUCT_PTR` was not modified to use it, probably by mistake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: rb_big_signnobu2016-11-191-3/+4
| | | | | | | * include/ruby/ruby.h (RBIGNUM_SIGN): use a wrapper function to return the sign bit, instead of comparing with 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Introduce table improvement by Vladimir Makarov <vmakarov@redhat.com>.ko12016-11-071-30/+35
| | | | | | | | | | | | | | | | | | | | | | | [Feature #12142] See header of st.c for improvment details. You can see all of code history here: <https://github.com/vnmakarov/ruby/tree/hash_tables_with_open_addressing> This improvement is discussed at <https://bugs.ruby-lang.org/issues/12142> with many people, especially with Yura Sokolov. * st.c: improve st_table. * include/ruby/st.h: ditto. * internal.h, numeric.c, hash.c (rb_dbl_long_hash): extract a function. * ext/-test-/st/foreach/foreach.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (tracepoint_attr_callee_id, rb_tracearg_callee_id):ktsj2016-11-051-1/+1
| | | | | | | | | | | add TracePoint#callee_id. [ruby-core:77241] [Feature #12747] * cont.c, eval.c, gc.c, include/ruby/intern.h, insns.def, thread.c, vm.c, vm_backtrace.c, vm_core.h, vm_eval.c, vm_insnhelper.c, vm_trace.c: ditto. * test/ruby/test_settracefunc.rb: tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/ruby.h: optimize rb_integer_type_pnobu2016-10-271-0/+12
| | | | | | | * include/ruby/ruby.h (rb_integer_type_p): turn into macro to help clang based on old gcc to eliminate CSE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: use prefixed macronobu2016-10-261-1/+1
| | | | | | | * include/ruby/ruby.h (rb_intern): use prefixed version macro RUBY_CONST_ID_CACHE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.h: include ruby/ruby.hnobu2016-10-231-0/+1
| | | | | | | * include/ruby/encoding.h: include "ruby/ruby.h" explicitly for enum ruby_fl_type and VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add prefix to FIX2LONG in include/ruby/ruby.hkazu2016-10-031-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: add prefixnobu2016-10-011-13/+15
| | | | | | | * include/ruby/ruby.h (RB_INT2FIX, RB_LONG2FIX): prefix RB to global symbols to get rid of name conflicts with other headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: rb_gc_adjust_memory_usagenobu2016-09-201-0/+1
| | | | | | | * gc.c (rb_gc_adjust_memory_usage): notify memory usage to the GC engine by extension libraries, to trigger GC. [Feature #12690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* util.h: POSIX-noncompliant setenvnobu2016-09-071-4/+0
| | | | | | | * include/ruby/util.h (setenv): remove POSIX-noncompliant definition with 2 arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h (ALWAYS_INLINE): Add alternative definition.ngoto2016-08-241-0/+3
| | | | | | | | Fix compile error with compilers that do not have force inline attribute, including old version of fcc on Solaris 10. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hide struct internal [Feature #9916]shyouhei2016-08-012-47/+6
| | | | | | | | | | | | | | * include/ruby/ruby.h (struct RStruct): no longer. * internal.h (struct RStruct): moved here. * struct.c (rb_struct_ptr): a compensation function for the lack of RSTRUCT_PTR. But now that we have RSTRUCT_GET/SET, that must not be used anyway. I mark this deprecated. Dont use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: use __extension__nobu2016-07-281-0/+6
| | | | | | | | | | * include/ruby/ruby.h (ruby_fl_type): use __extension__ to get rid of pedantic warning against RUBY_FL_USER19. https://github.com/skylightio/skylight-ruby/issues/64 * include/ruby/ruby.h (rb_mul_size_overflow): ditto for use of int128. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regenc.h/c, include/ruby/oniguruma.h, enc/ascii.c, big5.c, cp949.c,duerst2016-07-241-17/+5
| | | | | | | | | | | emacs_mule.c, euc_jp.c, euc_kr.c, euc_tw.c, gb18030.c, gbk.c, iso_8859_1|2|3|4|5|6|7|8|9|10|11|13|14|15|16.c, koi8_r.c, koi8_u.c, shift_jis.c, unicode.c, us_ascii.c, utf_16|32be|le.c, utf_8.c, windows_1250|51|52|53|54|57.c, windows_31j.c, unicode.c: Remove conditional compilation macro ONIG_CASE_MAPPING. [Feature #12386]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: use prefixed namenobu2016-07-221-2/+2
| | | | | | | * include/ruby/ruby.h (RTEST, NIL_P): use RUBY prefixed name in macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RUBY_USE_SETJMPEXnobu2016-06-201-1/+1
| | | | | | | | * configure.in, include/ruby/defines.h (RUBY_USE_SETJMPEX): include setjmpex.h only when using setjmpex() for RUBY_SETJMP. the header of mingw32 overrides setjmp() by setjmpex(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove backward macrosnobu2016-06-141-5/+0
| | | | | | | | * include/ruby/backward.h (rb_cFixnum, rb_cBignum): remove the backward compatibility macros, to fail incompatible extension libraries earily. [Bug #12427] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Integer unification macronobu2016-06-132-0/+10
| | | | | | | | | | | * include/ruby/ruby.h (RUBY_INTEGER_UNIFICATION): macro to tell if Integer is integrated. [ruby-core:75718][Bug #12427] * include/ruby/backward.h, internal.h (rb_cFixnum, rb_cBignum): fallback to rb_cInteger. * bignum.c, numeric.c, ext/json/generator/generator.{c,h}: use the macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h (GCC_VERSION_SINCE): Fix logic error byngoto2016-06-101-2/+2
| | | | | | | | adding parentheses. Fix failures of TestMkmf::TestConvertible with GCC 3.4.3 on Solaris 10. [Bug #12479] [ruby-dev:49660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: New static function rb_str_ascii_casemap; special-casingduerst2016-06-081-0/+8
| | | | | | | | | | :ascii option in rb_str_upcase_bang and rb_str_downcase_bang. * regenc.c: Fix a bug (wrong use of unnecessary slack at end of string). * regenc.h -> include/ruby/oniguruma.h: Move declaration of onigenc_ascii_only_case_map so that it is visible in string.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h: Remove excess semicolons in PUREFUNC().ngoto2016-06-081-2/+2
| | | | | | | | | Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470] * internal.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: reduce repeated calcuationsnobu2016-06-021-3/+8
| | | | | | | | | * include/ruby/ruby.h (rb_scan_args_{hash,block}_idx): reduce repeated index calcuations. * include/ruby/ruby.h (rb_scan_args_end_idx): unused right now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * addr2line.c: drop to support ATARI ST platform. It was discontinuedhsbt2016-05-281-5/+3
| | | | | | | | more than two decades ago. [fix GH-1350] Patch by @cremno * include/ruby/ruby.h: ditto. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix non-static rb_scan_argsnobu2016-05-271-35/+126
| | | | | | | | | | | | * include/ruby/ruby.h (rb_scan_args): remove nul padding which caused syntax error if fmt is not a string literal. * include/ruby/ruby.h (rb_scan_args_verify): suppress array-bounds warnings by old clang. * include/ruby/ruby.h (rb_scan_args0): make extractor macros inline functions, which do not varidate the format and are unnecessary to be expanded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix parameter namenobu2016-05-271-1/+1
| | | | | | * include/ruby/ruby.h (rb_scan_args): fix macro parameter name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix for old clangnobu2016-05-261-9/+15
| | | | | | | | | | | | | | | | * include/ruby/ruby.h (rb_scan_args): add nul padding here to apply to all references. * include/ruby/ruby.h (rb_scan_args_verify): move length mismatch check outside conditional operators. Since old clang cannot optimize away string literal dereference by an immediate index, e.g., ""[0], and both of true and false side expressions are compiled and warned unintentionally. With such old compilers, the check in rb_scan_args() does not work but may result unpredictable value if the format is wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: suppress warningsnobu2016-05-261-2/+2
| | | | | | | * include/ruby/ruby.h (rb_scan_args_count): add filler nul bytes to suppress array-bounds warnings by old clang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: count and verifynobu2016-05-261-71/+52
| | | | | | | * include/ruby/ruby.h (rb_scan_args_count): verify length with counting variables together. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r55171nobu2016-05-261-31/+31
| | | | | | | | Revert r55171, "ruby.h: fix clang warnings", it did fix array-bounds warnings, but caused string-plus-int warnings instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix clang warningsnobu2016-05-261-31/+31
| | | | | | | * include/ruby/ruby.h (rb_scan_args0): use pointer dereference forms instead of array forms, to get rid of warnings by clang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: rb_scan_args_validatenobu2016-05-251-6/+29
| | | | | | | * include/ruby/ruby.h (rb_scan_args_validate): move failed condition to the terminal. [ruby-core:75714] [Bug #12426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: optimize rb_scan_args_setnobu2016-05-241-15/+6
| | | | | | | | * include/ruby/ruby.h (rb_scan_args_set): check the arity after adjusting argc for an option hash, for optimization in simpler cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: rb_scan_args_verifynobu2016-05-241-48/+89
| | | | | | | | * include/ruby/ruby.h (rb_scan_args_verify): verify the format to scan if no invalid chars and variable argument length matching, at the compile time if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defines.h: fallback ERRORFUNC and WARNINGFUNCnobu2016-05-241-0/+12
| | | | | | | * include/ruby/defines.h (ERRORFUNC, WARNINGFUNC): add fallback definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* missing.h: isfinitenobu2016-05-231-0/+7
| | | | | | * include/ruby/missing.h (isfinite): move from numeric.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert error attributesnobu2016-05-231-5/+0
| | | | | | | * include/ruby/ruby.h (rb_scan_args0): revert error attributes, which may not be optimized away in readline extension library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* make compile error if possiblenobu2016-05-231-2/+10
| | | | | | | | * include/ruby/ruby.h (rb_scan_args0): make compile error if the format is wrong or does not match with the variable argument length if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fatal error if variable argument length mismatchnobu2016-05-231-3/+6
| | | | | | | | * include/ruby/ruby.h (rb_scan_args0): raise fatal error if variable argument length does not match, it is a bug in the code which uses rb_scan_args, not a runtime error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Extend OnigEncodingTypeDefine to define aduerst2016-05-221-0/+3
| | | | | | | | | | | | | new encoding primitive 'case_map' for case mapping * enc/utf-8.c, utf_16be/le.c, utf_32be/le.c: add onigenc_unicode_case_map as case_map primitive * enc/ascii.c, big5.c, cp949.c, emacs_mule.c, euc_jp/kr/tw.c, gb18030.c, gbk.c, iso_8859_1/2/3/4/5/6/7/8/9/10/11/13/14/15/16.c, koi8_r/u.c, shift_jis.c, us_ascii.c, windows_1250/1251/1252.c: add onigenc_not_support_case_map as case_map primitive git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_scan_args): use original rb_scan_argsnaruse2016-05-221-2/+4
| | | | | | when fmt is dynamic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_scan_args): moved to bottom of the file to make thenaruse2016-05-221-0/+138
| | | | | | | | | | effect of `#undef rb_scan_args` the minimum. * include/ruby/ruby.h (rb_scan_args): overwrite only if GCC and optimized. Visual C++ 14 or later can compile it but make it conservative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r50102naruse2016-05-211-138/+1
| | | | | | | This reverts "* include/ruby/ruby.h (rb_scan_args): don't use ALWAYS_INLINE with" This rb_scan_args macro is GCCism. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_scan_args): don't use ALWAYS_INLINE withusa2016-05-211-1/+1
| | | | | | | `inline`. if gcc needs this duplication, do in ALWAYS_INLINE macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e