aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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
* * include/ruby/ruby.h (RB_LIKELY): use prefix in ruby.h.naruse2016-04-231-9/+9
| | | | | | * intern.h (LIKELY): define with RB_LIKELY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_mul_size_overflow): added to handlenaruse2016-04-221-9/+20
| | | | | | | | | | | mul overflow efficiently. * include/ruby/ruby.h (rb_alloc_tmp_buffer2): use rb_mul_size_overflow and avoid division where it can define DSIZE_T. * gc.c (xmalloc2_size): moved from ruby.h and use rb_mul_size_overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c: use uint32_t instead of long to avoid confusion aboutnaruse2016-04-221-1/+1
| | | | | | the type of ivtbl->numiv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_alloc_tmp_buffer_with_count): added like xmalloc2 tonaruse2016-04-211-3/+21
| | | | | | | | | | | avoid duplicated check of size. * gc.c (ruby_xmalloc2): added to keep separate layers. * include/ruby/ruby.h (rb_alloc_tmp_buffer2): added to check the size more statically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (LIKELY): moved from internal.h.naruse2016-04-211-0/+9
| | | | | | * include/ruby/ruby.h (UNLIKELY): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (objspace_malloc_prepare): remove size check because it isnaruse2016-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | used by objspace_xmalloc and objspace_xcalloc. objspace_xmalloc introduces its own check in this commit. objspace_xcalloc checks with xmalloc2_size (ruby_xmalloc2_size). * gc.c (objspace_xmalloc0): common xmalloc function. * gc.c (objspace_xmalloc): introduce its own size check. * gc.c (objspace_xmalloc2): separated from ruby_xmalloc2 to clarify the layer who has the responsibility to check the size. * gc.c (objspace_xrealloc): remove duplicated size check. * gc.c (ruby_xmalloc2): use objspace_xmalloc2. * include/ruby/ruby.h (ruby_xmalloc2_size): follow the size limit as SSIZE_MAX. Note that ISO C says size_t is unsigned integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_check_arity returns argc nownobu2016-04-021-1/+2
| | | | | | * include/ruby/intern.h (rb_check_arity): returns argc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_isupper, rb_islower, rb_isalpha, rb_isdigit,naruse2016-03-291-29/+28
| | | | | | | | | | | rb_isalnum, rb_isxdigit, rb_isblank, rb_isspace, rb_isblank, rb_iscntrl, rb_isprint, rb_ispunct, rb_isgraph, rb_tolower, rb_toupper): use inline function to avoid function call. * include/ruby/ruby.h (rb_isascii): use inline function to clarify the logic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Additional flag for characters that are titlecase.duerst2016-03-221-0/+1
| | | | | | | | | | * enc/unicode/case-folding.rb, casefold.h: Using above flag in data. * enc/unicode.c: Marking capitalized character as unmodified if it is already titlecase. * test/ruby/enc/test_case_mapping.rb: Tests for above functionality. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_big_odd_p, rb_big_even_p): move tomrkn2016-03-191-2/+0
| | | | | | | | internal.h so that they are exported only for ruby itself. * internal.h (rb_big_odd_p, rb_big_even_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_big_hash): Move to internal.h.mrkn2016-03-181-1/+0
| | | | | | * internal.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_hash): make it public function to be available inmrkn2016-03-181-0/+1
| | | | | | | | | | | | | other source files, and remove documentation comment for Bignum#hash. * bignum.c (Bignum#hash): remove its definition because it is unified with Object#hash. * include/ruby/intern.h (rb_big_hash): add a prototype declaration. * hash.c (any_hash): treat Bignum values directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_even_p, rb_big_odd_p): make them public functionsmrkn2016-03-171-0/+2
| | | | | | | | | to be available in other source files. * include/ruby/intern.h (rb_big_even_p, rb_big_odd_p): add prototype declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: remove RB_GC_GUARD_PTRnobu2016-03-171-12/+4
| | | | | | | * include/ruby/ruby.h (RB_GC_GUARD_PTR): remove intermediate macro, and expand for each RB_GC_GUARD. [Fix GH-1293] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h, enc/unicode.c: Adjusting flag assignmentsduerst2016-03-141-20/+18
| | | | | | | | and macros to work with unified CaseMappingSpecials array. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.h: fix O_SHARE_DELETEnobu2016-03-131-1/+1
| | | | | | | * include/ruby/win32.h (O_SHARE_DELETE): change to fit Fixnum limit. [ruby-core:74285] [Bug #12171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: functions for class internalsnobu2016-03-071-4/+0
| | | | | | | * internal.h: move function declarations for class internals from include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-02-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Rearranging flag assignments and makingduerst2016-02-241-12/+35
| | | | | | | | | | | space for titlecase indices; adding additional macros to add or extract titlecase index; adding comments for better documentation. * enc/unicode.c: Moving some macros to include/ruby/oniguruma.h; activating use of titlecase indices. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.h: rb_enc_asciicompat_inlinenobu2016-02-041-1/+6
| | | | | | | * include/ruby/encoding.h (rb_enc_asciicompat): turn into an inline function to get rid of evalucating the argument twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c: Introduce RREGEXP_PTR.naruse2016-02-021-1/+2
| | | | | | | | | | | | | | | | | patch by dbussink. partially merge https://github.com/ruby/ruby/pull/497 * include/ruby/ruby.h: ditto. * gc.c: ditto. * ext/strscan/strscan.c: ditto. * parse.y: ditto. * string.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* disable unaligned word accessnobu2016-01-151-0/+4
| | | | | | | * include/ruby/defines.h, st.c: disable unaligned word access with gcc 6 or later. [Bug #11831] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/oniguruma.h: Added flags needed for upcase/downcaseduerst2016-01-111-0/+8
| | | | | | Unicode addition (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.h: remove old macrosnobu2016-01-111-8/+0
| | | | | | | * include/ruby/io.h (RB_IO_BUFFER_INIT, RB_IO_FPTR_NEW): remove old macros only for internal use and obsolete since 2.2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* missing.h: remove explicit_bzero_by_memset_snobu2016-01-101-13/+1
| | | | | | | | | * include/ruby/missing.h (explicit_bzero_by_memset_s): remove inline implementation by memset_s, which needs a macro before including headers and can cause problems in extension libraries by the order of the macro and headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_Pmrkn2016-01-071-0/+7
| | | | | | | and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++. [ruby-core:72736] [Bug #11962] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* version.c: no exit in ruby_show_copyrightnobu2016-01-072-0/+24
| | | | | | | | | | * include/ruby/backward.h (ruby_show_copyright_to_die): for source code backward compatibility. * ruby.c (process_options): return Qtrue to exit the process successfully. * version.c (ruby_show_copyright): no longer exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* version.h (RUBY_VERSION): 2.4.0 development has started.matz2015-12-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/CangeLog-2.3.0, ext/tk/lib/txextlib/SUPPORT_STATUS,duerst2015-12-251-1/+1
| | | | | | include/ruby/version.h: minor grammar fixes [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix common misspelling [ci skip]nobu2015-12-241-1/+1
| | | | | | | * compile.c, cont.c, doc, man: fix common misspelling. [ruby-core:72466] [Bug #11870] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* deprecate exposed internal functionsnobu2015-12-241-3/+3
| | | | | | | | | * error.c (rb_compile_error_with_enc, rb_compile_error), (rb_compile_bug): deprecate internal functions. * parse.y (parser_yyerror): construct exception message with source code and carret. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_readwrite_syserr_failnobu2015-12-231-5/+7
| | | | | | | * io.c (rb_readwrite_syserr_fail): works with the given errno than thread local errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* introduce rb_autoload_str to replace rb_autoloadnormal2015-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_autoload_str may be safer by preventing premature GC. It can also be more efficient by passing a pre-frozen string that can be deduped using rb_fstring. Common autoload callers (e.g. rubygems, rdoc) already use string literals as the file argument. There seems to be no reason to expose rb_autoload_str to the public C API since autoload is not performance-critical. Applications may declare autoloads in Ruby code or via rb_funcall; so merely deprecate rb_autoload without exposing rb_autoload_str to new users. Running: valgrind -v ruby -rrdoc -rubygems -e exit shows a minor memory reduction (32-bit userspace) before: in use at exit: 1,600,621 bytes in 28,819 blocks total heap usage: 55,786 allocs, 26,967 frees, 6,693,790 bytes allocated after: in use at exit: 1,599,778 bytes in 28,789 blocks total heap usage: 55,739 allocs, 26,950 frees, 6,692,973 bytes allocated * include/ruby/intern.h (rb_autoload): deprecate * internal.h (rb_autoload_str): declare * load.c (rb_mod_autoload): use rb_autoload_str * variable.c (rb_autoload): become compatibility wrapper (rb_autoload_str): hoisted out from old rb_autoload [ruby-core:71369] [Feature #11664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RB_OBJ_TAINT): follow-up of r52881.ngoto2015-12-041-1/+1
| | | | | | | | | Turn into void expression not to use unexpected result. Fix "operands have incompatible types" error with Oracle Solaris Studio 12.x on Solaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: make flag setting macros voidnobu2015-12-041-8/+8
| | | | | | | | * include/ruby/ruby.h (RB_FL_{SET,UNSET,REVERSE,INFECT,FREEZE}): turn into void expressions not to use unexpected results. these macros were statements till 2.2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* missing.h: __STDC_WANT_LIB_EXT1__nobu2015-12-021-0/+2
| | | | | | | * include/ruby/missing.h: get rid of redefinition of __STDC_WANT_LIB_EXT1__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* missing.h: __STDC_WANT_LIB_EXT1__nobu2015-12-021-0/+2
| | | | | | | * include/ruby/missing.h: __STDC_WANT_LIB_EXT1__ is necessary for memset_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* explicit_bzero.c: needs windows.hnobu2015-12-011-1/+1
| | | | | | | * missing/explicit_bzero.c, random.c (explicit_bzero): SecureZeroMemory() needs windows.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e