aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* * 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
* * include/ruby/ruby.h (rb_scan_args): use __VA_ARGS__ instead ofnaruse2016-05-211-1/+138
| | | | | | | | va_arg to allow compilers optimize more aggressive. https://gustedt.wordpress.com/2011/07/10/avoid-writing-va_arg-functions/ rb_scan_args is now expected to be statically resolved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use RB_GNUC_EXTENSION_BLOCK instead of __extension__ngoto2016-05-203-56/+50
| | | | | | | | | | | | | | | | | | | * include/ruby/defines.h (RB_GNUC_EXTENSION, RB_GNUC_EXTENSION_BLOCK): macros for skipping __extension__ on non-GCC compilers. * eval_error.c (warn_print): use RB_GNUC_EXTENSION_BLOCK instead of __extension__ because __extension__ is a GNU extension. Fix compile error on Solaris 10 with Oracle Solaris Studio 12.x. [Bug #12397] [ruby-dev:49629]. * internal.h (rb_fstring_cstr, rb_fstring_enc_cstr): ditto * include/ruby/encoding.h (rb_enc_str_new, rb_enc_str_new_cstr): ditto * include/ruby/intern.h (rb_str_new, rb_str_new_cstr, rb_usascii_str_new, rb_utf8_str_new, rb_tainted_str_new_cstr, rb_usascii_str_new_cstr, rb_utf8_str_new_cstr, rb_external_str_new_cstr, rb_locale_str_new_cstr, rb_str_buf_new_cstr, rb_str_cat_cstr, rb_exc_new_cstr): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: RB_INTEGER_TYPE_Pnobu2016-05-181-0/+9
| | | | | | | | * include/ruby/ruby.h (RB_INTEGER_TYPE_P): new macro and underlying inline function to check if the object is an Integer (Fixnum or Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [Feature #12005] Unify Fixnum and Bignum into Integerakr2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [Feature #12005] Unify Fixnum and Bignum into Integer * include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums. * insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG. * vm_core.h: Ditto. * vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead of FIXNUM_REDEFINED_OP_FLAG. * vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of rb_cFixnum and rb_cBignum. (C): Use Integer instead of Fixnum and Bignum. * numeric.c (fix_succ): Removed. (Init_Numeric): Define Fixnum as Integer. * bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum. (rb_int_coerce): replaced from rb_big_coerce and return fixnums as-is. (Init_Bignum): Define Bignum as Integer. Don't define ===. * error.c (builtin_class_name): Return "Integer" for fixnums. * sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum. * ext/-test-/testutil: New directory to test. Currently it provides utilities for fixnum and bignum. * ext/json/generator/generator.c: Define mInteger_to_json. * lib/mathn.rb (Fixnum#/): Redefinition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Introducing ONIG_CASE_MAPPING compilationduerst2016-05-161-0/+12
| | | | | | | | | switch * include/ruby/oniguruma.h, enc/unicode.h: Using ONIG_CASE_MAPPING compilation switch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defines.h: avoid redefinitionnobu2016-05-121-0/+2
| | | | | | | * include/ruby/defines.h (GCC_VERSION_SINCE): get rid of re-definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo in r54988naruse2016-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/defines.h (GCC_VERSION_SINCE): moved from internal.hnaruse2016-05-122-14/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use HAVE_BUILTIN___BUILTIN_CONSTANT_Pnaruse2016-05-122-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{defines,ruby}.h: need to define function attributesusa2016-05-082-38/+40
| | | | | | | | | alternatives in defines.h instead of ruby.h, because they are used in oniguruma.h and the header used without including ruby.h at encoding library sources. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (CONSTFUNC, PUREFUNC): fixed build errors onusa2016-05-081-0/+6
| | | | | | | non-gcc build environments introduced at r54952. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check function attirbute const and pure,naruse2016-05-086-44/+42
| | | | | | | | | | | | and define CONSTFUNC and PUREFUNC if available. Note that I don't add those options as default because it still shows many false-positive (it seems not to consider longjmp). * vm_eval.c (stack_check): get rb_thread_t* as an argument to avoid duplicate call of GET_THREAD(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: suppress warningsnobu2016-05-081-2/+2
| | | | | | | * include/ruby/intern.h (rb_disable_super, rb_enable_super): remove NORETURN. these do nothing but just return. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: add -Wsuggest-attribute=noreturn and suppress warnings.naruse2016-05-082-16/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements newusa2016-05-021-2/+3
| | | | | | | | | | truncate alternative which accepts UTF-8 path. * file.c (truncate): use above function. [Bug #12340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert UNALIGNED_WORD_ACCESS for GCC6naruse2016-04-301-4/+0
| | | | | | | | Released GCC 6.0 fixed the issue. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69291 [ruby-core:72211] [Bug #11831] [Bug #11979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_mul_size_overflow): use UNLIKELYnaruse2016-04-231-2/+2
| | | | | | by user side to improve generallity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e