summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2013-05-14iphlpapi is unavailable with older VCnobu
* include/ruby/win32.h, win32/Makefile.sub, win32/win32.c: iphlpapi is not available with older Visual C. works with VC9 or later at least. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14win32.h: fix for VC9nobu
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): split from intptr_t and uintptr_t, since VC9 defines the latters only in crtdefs.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
arrays (T_ARRAY). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
objects (T_STRING). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
objects (T_OBJECT). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
objects for numeric types (Float, Complex, Rational, Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable RGENGC (USE_RGENGC)ko1
but no type creates write protected (sunny) objects (RGENGC_WB_PROTECTED_* == 0). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c: support RGENGC. [ruby-trunk - Feature #8339]ko1
See this ticet about RGENGC. * gc.c: Add several flags: * RGENGC_DEBUG: if >0, then prints debug information. * RGENGC_CHECK_MODE: if >0, add assertions. * RGENGC_PROFILE: if >0, add profiling features. check GC.stat and GC::Profiler. * include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0). * array.c: add write barriers for T_ARRAY and generate sunny objects. * include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if you want to access raw pointers. If you modify the contents which pointer pointed, then you need to care write barrier. * bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects. * complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX and generate sunny objects. * rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write barriers for T_RATIONAL and generate sunny objects. * internal.h: add write barriers for RBasic::klass. * numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects. * object.c (rb_class_allocate_instance), range.c: generate sunny T_OBJECT objects. * string.c: add write barriers for T_STRING and generate sunny objects. * variable.c: add write barriers for ivars. * vm_insnhelper.c (vm_setivar): ditto. * include/ruby/ruby.h, debug.c: use two flags FL_WB_PROTECTED and FL_OLDGEN. * node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED): move flag bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RRational::(num,den) andko1
RComplex::(real,imag). Add macro to set these values: * RRATIONAL_SET_NUM() * RRATIONAL_SET_DEN() * RCOMPLEX_SET_REAL() * RCOMPLEX_SET_IMAG() This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. TODO: API design. RRATIONAL_SET(rat,num,den) is enough? TODO: Setting constify variable with cast has same issue of r40691. * complex.c, rational.c: use above macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: fix a typoeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]usa
emulate getipaddrs(3) on Unix. * win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above function. * include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't substitute for any function, so use non-prefixed name. * ext/socket/extconf.rb (socketpair); follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 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-13* include/ruby/ruby.h: add new utility macros to accessko1
Array's element. * RARRAY_AREF(a, i) returns i-th element of an array `a' * RARRAY_ASET(a, i, v) set i-th element of `a' to `v' This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* object.c (rb_obj_setup): added.ko1
* include/ruby/ruby.h (OBJSETUP): ues rb_obj_setup() instead of a macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12ruby.h: OFFT2NUM redefinitionnobu
* include/ruby/ruby.h (OFFT2NUM): RUBY_REPLACE_TYPE also defines macro to convert int type to VALUE if found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* include/ruby/intern.h (rb_iv_set, rb_iv_get): removed. Bcausekosaki
ruby.h has a declaration for that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* include/ruby/intern.h (rb_uint2big, rb_int2big, rb_uint2inum)kosaki
(rb_int2inum, rb_ll2inum, rb_ull2inum): removed because ruby.h has a declaration for these. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* configure.in: removes AC_CHECK_FUNC(ftruncate64).kosaki
* configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating NUM2OFFT. * file.c (rb_file_truncate): use correct type. chsize() take a long. * include/ruby/ruby.h (NUM2OFFT): use a definition created by a configure script by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,kosaki
ftello64). They are not used from anywhere. * win32/win32.c (fseeko): removes. * win32/win32.c (rb_w32_ftello): removes. * include/ruby/win32.h: removes declarations of rb_w32_ftello and rb_w32_fseeko. * win32/Makefile.sub: removes '#define HAVE_FTELLO 1'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08ruby.h: ISGRAPHnobu
* include/ruby/ruby.h (ISGRAPH): add missing macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-03* include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): New forkosaki
attribute((alloc_size(params))). * include/ruby/defines.h (xmalloc, xmalloc2, xcalloc) (xrealloc, xrealloc2): Annotated by RUBY_ATTR_ALLOC_SIZE. * include/ruby/ruby.h (rb_alloc_tmp_buffer): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-03win32.h: INTPTR_MAX, INTPTR_MIN, UINTPTR_MAXnobu
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): also should be defined when defining intptr_t and uintptr_t. bigdecimal.c requires the former two now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-30intern.h: rb_block_lambdanobu
* include/ruby/intern.h (rb_block_lambda): add declaration instead of deprecated rb_f_lambda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25* benchmark/bm_hash_shift.rb: add benchmark for Hash#shiftcharliesome
* hash.c (rb_hash_shift): use st_shift if hash is not being iterated to delete element without iterating the whole hash. * hash.c (shift_i): remove function * include/ruby/st.h (st_shift): add st_shift function * st.c (st_shift): ditto [Bug #8312] [ruby-core:54524] Patch by funny-falcon git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13* Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.naruse
[bug] fix problem with optimization of \z (Issue #16) [Bug #8210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08Fix #6154 by introducing new EAGAIN/EWOULDBLOCK/EINPROGRESSheadius
subclasses that include WaitReadable or WaitWritable rather than extending them into the exception object each time. * error.c: Capture EGAIN, EWOULDBLOCK, EINPROGRESS exceptions and export them for use in WaitReadable/Writable exceptions. * io.c: Create versions of EAGAIN, EWOULDBLOCK, EINPROGRESS that include WaitReadable and WaitWritable. Add rb_readwrite_sys_fail for nonblocking failures using those exceptions. Use that function in io_getpartial and io_write_nonblock instead of rb_mod_sys_fail * ext/openssl/ossl_ssl.c: Add new SSLError subclasses that include WaitReadable and WaitWritable. Use those classes for write_would_block and read_would_block instead of rb_mod_sys_fail. * ext/socket/ancdata.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in bsock_sendmsg_internal and bsock_recvmsg_internal. * ext/socket/init.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in rsock_s_recvfrom_nonblock and rsock_s_connect_nonblock. * ext/socket/socket.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in sock_connect_nonblock. * include/ruby/ruby.h: Export rb_readwrite_sys_fail for use instead of rb_mod_sys_fail. Introduce new constants RB_IO_WAIT_READABLE and RB_IO_WAIT_WRITABLE for first arg to rb_readwrite_sys_fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07* include/ruby/defines.h: Simplify the logic to include sys/select.h.akr
This fixes a compilation error on Haiku (gcc2 and gcc4). * configure.in: Use shared linker as $(CC) for Haiku. This fixes a build error on Haiku (gcc2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05fix a typo.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* include/ruby/defines.h (HAVE_TRUE_LONG_LONG): Defined to distinguishakr
availability of long long and availability of 64bit integer type. * pack.c: Use HAVE_TRUE_LONG_LONG to distinguish q! and Q! support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}nobu
* include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility control macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04* include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.akr
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests. * test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-29ruby/io.h: get rid of conflict on AIXnobu
* include/ruby/io.h: undef POSIX compliants names on AIX, which are no longer needed. patch suggested by edelsohn (David Edelsohn) in [ruby-core:53815]. [Bug #8174] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-28ruby/io.h: get rid of conflict on AIXnobu
* include/ruby/io.h: rename SVR3,4 member names as POSIX compliants, to get rid of conflict on AIX. [ruby-core:53765] [Bug #8174] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-27* include/ruby/intern.h: Delete redundant inclusions caused byakr
AC_INCLUDES_DEFAULT in defines.h. * include/ruby/defines.h: Ditto. * include/ruby/ruby.h: Ditto. * include/ruby/st.h: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-27* include/ruby/defines.h: Fix a compilation error on NetBSD,akr
"type of formal parameter 1 is incomplete" for the rb_thread_wait_for invocation in rb_file_flock, by including header files as AC_INCLUDES_DEFAULT of autoconf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21revert r39861nobu
* include/ruby/ruby.h: revert r39861 because RB_UNUSED_VAR() is used for array variables in extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21ruby.h: RB_UNUSED_VAR from UNINITIALIZED_VARnobu
* include/ruby/ruby.h (RB_UNUSED_VAR): move code from UNINITIALIZED_VAR() in vm_core.h. * vm_core.h (UNINITIALIZED_VAR): use RB_UNUSED_VAR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* include/ruby/missing.h: removed __linux__. it's unnecessary.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16missing.h: build fixnobu
* include/ruby/missing.h: include time.h and sys/time.h iff needed, but excepct for sys/time.h on linux to get rid of glibc bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16mingw build fixnobu
* configure.in: struct timeval is defined in winsock2.h on mingw. * include/ruby/missing.h: include time.h for time_t, and sys/time.h for timeval and timespec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* include/ruby/missing.h (__syscall): moved to...kosaki
* io.c: here. because __syscall() is only used from io.c. * include/ruby/missing.h: move "#include <sys/type.h>" to .... * include/ruby/intern.h: here. because it was introduced for fixing NFDBITS issue. [ruby-core:05179]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* include/ruby/missing.h (struct timespec): include <sys/time.h>kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* configure.in: check struct timeval exist or not.kosaki
* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL properly. and don't include sys/time.h if struct timeval exist. * file.c: include sys/time.h explicitly. * random.c: ditto. * thread_pthread.c: ditto. * time.c: ditto. * ext/date/date_strftime.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06intern.h: macro rb_check_aritynobu
* include/ruby/intern.h (rb_check_arity): same name macro for backward compatibility checking by ifdef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05intern.h: inline function rb_check_aritynobu
* include/ruby/intern.h (rb_check_arity): make a static inline function so it can be used as an expression and argc would be evaulated only once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-01* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757fnaruse
v5.13.3 [Bug#7972] [Bug#7974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25version.h: bump RUBY_API_VERSIONnobu
* include/ruby/version.h: bump RUBY_API_VERSION same as RUBY_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20ruby.h: HAVE_RB_SCAN_ARGS_OPTIONAL_HASHnobu
* include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for rb_scan_args() optional hash feature. [Bug #7861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30win32.h: revert r37337nobu
* include/ruby/win32.h (fstat): revert r37337, which uses _fstati64() instead of fstati64() on mingw32. [Bug #7276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e