summaryrefslogtreecommitdiff
path: root/ruby.h
AgeCommit message (Collapse)Author
2008-07-10merge revision(s) 17842:shyouhei
* include/ruby/ruby.h (POSFIXABLE): use FIXNUM_MAX+1 instead of FIXNUM_MAX to make it possible to convert to double accurately. It assumes FLT_RADIX is 2. fix RubyForge bug #14102. backported from 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15* dir.c, win32/win32.c, win32/dir.h, ruby.h, intern.h: Bringknu
encoding aware globbing support in from trunk. Dir.[] and Dir.glob() can now take many patterns in an array. Minor fixes will follow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-04* ruby.h (OFFT2NUM): use LONG2NUM() if sizeof(long) equals tomatz
sizeof(off_t). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-23* eval.c (rb_thread_save_context, rb_thread_restore_context):why
sandbox hook to save and restore sandbox state. * eval.c (thread_no_ensure): added THREAD_NO_ENSURE thread flag. * eval.c (rb_thread_kill_bang): Thread#kill! uses the above flag to circumvent ensure, in order to prevent endless loops. [ruby-core:08768] * eval.c (rb_thread_kill): fix Thread#kill docs, which returns the thread object in all cases. * node.h: expose the rb_jmpbuf_t and rb_thread_t structs, along with the thread flags. used by the sandbox extension. * ruby.h: extern rb_eThreadError, so sandbox can swap it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-07* ruby.h (RSTRING_PTR): add migration macro.matz
* ruby.h (RARRAY_PTR): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01* common.mk, configure.in, defines.h, eval.c, gc.c, main.c,akr
numeric.c, ruby.h, ia64.s: backport IA64 HP-UX support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-07* dln.c, eval.c, gc.c, regex.c, ruby.h: shut up AIX allocamatz
warning. [ruby-dev:29191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-31* ruby.h: use ifdef (or defined) for macro constants that may ormatz
may not be defined to shut up gcc's -Wundef warnings. [ruby-core:08447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-20* ruby.h: export classes/modules to implement sandbox.matz
[ruby-core:08283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-13* array.c (rb_ary_pop): may cause realloc oscillation. a patchmatz
from MORITA Naoyuki <mlgetter at kidou.sakura.ne.jp>. [ruby-dev:29028] * parse.y (then): we'd like to reserve colon here for the future. warning added. * ruby.h: export rb_cMethod. [ruby-talk:201259] * ext/bigdecimal/bigdecimal.c: Allows '_' to appear within digits. [ruby-dev:28872] * ext/bigdecimal/lib/bigdecimal/util.rb: Bug in to_r reported by [ruby-list:42533] fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-10* signal.c (ruby_nativethread_signal, posix_nativethread_signal,nagai
sigsend_to_ruby_thread, install_nativethread_sighandler): nativethread-support on signal handler. RE-backport from 1.9. * ruby.h (HAVE_NATIVETHREAD_KILL): ditto. * eval.c (ruby_native_thread_kill): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-23* signal.c: revert last change.nagai
* ruby.h: ditto. * eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-21* signal.c (ruby_nativethread_signal, posix_nativethread_signal,nagai
sigsend_to_ruby_thread, install_nativethread_sighandler): nativethread-support on signal handler (backport from 1.9). * ruby.h (HAVE_NATIVETHREAD_KILL): ditto. * eval.c (ruby_native_thread_kill): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-14* configure.in: check sizeof(rlim_t).akr
check setrlimit. * process.c (proc_getrlimit): new method Process.getrlimit. (proc_setrlimit): new method Process.setrlimit. * ruby.h (NUM2ULL): new macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-25* ruby.h, lib/mkmf.rb (create_header): clear command line options fornobu
macros moved to extconf.h. * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and EXTSTATIC permanent. * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added $(INCFLAGS). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-01* ruby.h (SYM2ID): should not cast to signed long.matz
[ruby-core:07414] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-05* ruby.h (RSTRUCT_LEN, RSTRUCT_PTR): defined for source levelakr
compatibility with ruby 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-26* ruby.h (Qfalse, Qtrue, Qnil, Qundef): make sure these immediateocean
values have VALUE type. there is an environment where sizeof(VALUE) != sizeof(int) like IA64. if 32bit integer (Qtrue) is passed to ANYARGS and received by 64bit integer (VALUE), upper bits may have garbage value. [ruby-dev:27513] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14* dir.c (ruby_glob): glob function not using ruby exception system.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27revered all LLP64 modifies due to portability reason.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27* gc.c (id2ref): must not assign pointers to long int. usematz
LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. [ruby-talk:149645] * ruby.h: use LONG_LONG to simplify the change. [ruby-talk:149645] * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. [ruby-talk:149553] * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit size pointer. [ruby-talk:149553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26* ruby.h: support LLP64 model. [ruby-talk:149524]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-07* enum.c (enum_min_by, enum_max_by): return nil if no iteration.nobu
fixed: [ruby-dev:26245] * eval.c (rb_need_block): ensure a block is given. * eval.c (backtrace): skip successive frames sharing same node. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-15* configure.in, ruby.h: define rb_[pgu]id_t macros instead of typedefsnobu
to get rid of types which might not be defined yet. [ruby-dev:26165] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-14* configure.in: Check for the availability of pid_t, gid_t and uid_t andnobu
remove AC_TYPE_UID_T. fixed: [ruby-core:04745] * defines.h: Remove pid_t typedef. * ruby.h: Define rb_pid_t, rb_gid_t and rb_uid_t in accordance with the available system types. * process.c: Change instances of pid_t and gid_t to their rb_* counterparts. * ext/pty/pty.c: Change pid_t to rb_pid_t. * vms/config.h: Define HAVE_{P,G,U}ID_T to 1. * win32/Makefile.sub: Remove #define for {g,u}id_t. * win32/win32.c: Change pid_t to rb_pid_t. * wince/Makefile.sub: Remove #define for {g,u}id_t. * wince/sys/types.h: Remove definitions of {p,g,u}id_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-31* intern.h: provide proper prototypes. [ruby-core:02724]nobu
* ruby.h: missing.h is now prerequisite to intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16* dir.c (rb_glob, rb_globi): add const.ocean
* ruby.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* configure.in (ac_cv_func_setitimer): moved from defines.hnobu
* defines.h, rubysig.h, signal.c: removed macro handling which should be done in configure. * configure.in (intrinsics.h): check if present. * ruby.h: include intrinsics.h if available. * bignum.c, marshal.c: include ieeefp.h if available. * missing.h (isinf): define as a macro if finite() and isnan() are available. [ruby-core:02032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11* configure.in (ieeefp.h), numeric.c: needed for finite() onnobu
Solaris. [ruby-core:01921] * file.c (rb_stat_inspect): adjust format specifier. * parse.c (arg_prepend): nodetype() is for debug use. * ruby.h (ISASCII, etc): cast to int to get rid of warning. * ruby.h (alloca.h): include even in GCC. [ruby-core:01925] * ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format specifier. * ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce, BigDecimal_divmod): use rb_assoc_new() to suppress memory usage. * ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto. * ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be volatile. * ext/iconv/iconv.c (iconv_convert): ensure actual parameter with format specifier. * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not define unless used. * ext/pty/pty.c (getDevice): get rid of warning. * ext/socket/socket.c (port_str, sock_s_getaddrinfo, sock_s_getnameinfo): FIX2INT() now returns long. * ext/socket/socket.c (init_inetsock_internal): uninitialized variable. * ext/syck/rubyext.c (syck_parser_assign_io): add prototype. * ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use ISDIGIT() instead of isdigit() to avoid warnings and for platforms which don't support non-ascii charater. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01* pack.c (htov16): converts endian using swap16. htov32(), hton16,matz
hton32 as well. [ruby-talk:85377] * pack.c (swap16): swap 2 bytes no matter how big short is on the platform. swap32() is also prepared. * numeric.c (rb_num2int): returns long to preserve information. rb_fix2int(), rb_num2uint(), rb_fix2uint() as well. [ruby-talk:85377] * numeric.c (rb_num2uint): should not check for value range if the source value is negative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25* ruby.h: don't treat Cygwin as Windows.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* check existence of "pthread.h"nagai
* define is_ruby_native_thread() macro when not HAVE_NATIVETHREAD git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* ruby.h: define is_ruby_native_thread() for no native thread environmentnagai
* eval.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* configure.in: always check existence of the pthread librarynagai
* ruby.h: define macros for ruby's native thread check * eval.c: add ruby's native thread check * gc.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-14* intern.h (ruby_stop): never return.nobu
* ruby.h (ruby_run): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-22* enum.c (inject_i): use rb_yield_values.matz
* enum.c (each_with_index_i): ditto. * eval.c (rb_yield_splat): new function to call "yield *values". * string.c (rb_str_scan): use rb_yield_splat(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* ruby.h (LLONG_MIN): fix typo.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* lib/net/smtp.rb (Net::SMTP::send0): add taint check.matz
* ruby.h (LLONG_MIN): wrong value. * io.c (rb_f_getc): $stdin may not be IO. [ruby-dev:20973] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-28* ext/stringio/stringio.c (strio_gets): only "gets" should set $_.matz
* ext/stringio/stringio.c (strio_getline): should not set $_ here. * io.c (argf_to_s): argf.to_s returns "ARGF". * io.c (set_defout_var, set_deferr_var): make $defout and $deferr obsolete. * io.c (set_input_var, set_output_var): allow $stdin, $stdout, $stderr not to be instance of IO. * io.c (rb_f_readline): forward method to current_file. gets, readline, readlines, getc, readchar, tell, seek, pos=, rewind, fileno, to_io, eof, each_line, each_byte, binmode, and closed? as well. * io.c (argf_forward): utility function to forward method to current_file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-20* string.c: use StringValueCStr to retrieve paths to system calls.matz
* string.c (rb_string_value_cstr): check null byte in the string before retrieving C ptr. accessed via macro StringValueCStr. * file.c (sys_fail2): raise error for two operand system calls such as rename, link, symlink. (ruby-bugs PR#1047) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* string.c (rb_str_upto): generate sequence according to "succ"matz
order. formerly check was done by dictionary order. [ruby-talk:74138] * string.c (rb_string_value): fill constant empty string along with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] * string.c (rb_string_value_ptr): ditto. * string.c (rb_check_string_type): ditto. * string.c (str_gsub): move END(0) check before mbclen2(). * string.c (scan_once): reduce END(0) check. * io.c (rb_io_initialize): accept fixnum mode. * eval.c (error_print): replace strchr() by memchr(), einfo may contain "\0". * pack.c (pack_unpack): range check for "@" move; initialize check for "m". * error.c (syserr_initialize): avoid buffer overflow. * file.c (rb_file_s_readlink): expand buffer until readlink succeed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-17* eval.c: remove rb_cBlock.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* gc.c (define_final): eliminate rb_f_lambda() call.matz
* class.c (rb_scan_args): ditto. * signal.c (sig_trap): ditto. * hash.c (rb_hash_initialize): ditto. * variable.c (rb_f_trace_var): ditto. * ext/dl/dl.c (rb_dl_callback): ditto. * ext/win32ole/win32ole.c (ev_on_event): ditto. * eval.c (ruby_cleanup): $SAFE is turned off in the finalization. Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30* numeric.c (rb_num2uint, rb_fix2int): new function to convertnobu
values over INT_MAX. [ruby-core:01099] * ruby.h (NUM2UINT, FIX2INT): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-20* eval.c (rb_yield_0): give warning for multiple values for amatz
block parameter. * eval.c (rb_yield_values): a function to yield multiple values. * array.c (sort_1): use rb_yield_values. * enum.c (min_ii, max_ii): ditto. * hash.c (rb_hash_update_block_i, delete_if_i, select_i, each_pair_i, env_each, env_reject_bang, env_select, env_update_i): ditto. * struct.c (rb_struct_each_pair): ditto. * eval.c (top_include): should include module in the current self, not ruby_top_self. [ruby-dev:20198] * eval.c (top_include): stop inclusion to ruby_wrapper; give warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-13* eval.c (error_pos): use $deferr for output instead of stderrmatz
directly. * eval.c (error_print,error_handle,rb_longjmp,rb_thread_schedule): ditto. * io.c (Init_IO): new variable $deferr which is default output port of error messages. * io.c (rb_warn_m): new method "warn". [new] * error.c (warn_print): use $deferr. * error.c (rb_bug): ditto. * error.c (err_append): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-25* io.c (rb_io_initialize): should check rb_secure(4).matz
* dir.c (dir_s_getwd): should check rb_secure(4). * object.c (rb_obj_infect): function version of OBJ_INFECT(). * eval.c (rb_secure_update): new function to check object update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-24security enhancement of dl library (need test).matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-04* configure.in, bcc32/Makefile.sub, win32/Makefile.sub: definenobu
RUBY_EXPORT to export symbols. * defines.h: use RUBY_EXTERN instead of EXTERN. * intern.h, re.h, ruby.h, rubysig.h: ditto. * win32/win32.h: remove EXTERN definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-09* intern.h (HAVE_RB_DEFINE_ALLOC_FUNC, RB_CVAR_SET_4ARGS):nobu
define to 1. * ruby.h (NORETURN_STYLE_NEW): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e