summaryrefslogtreecommitdiff
path: root/rubyio.h
AgeCommit message (Collapse)Author
2007-02-25* rubyio.h (HAVE_RB_IO_T): macro to tell if rb_io_t is defined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):nobu
renamed from OpenFile. * ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h, ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c, ext/readline/readline.c, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-18* configure.in (pid_t, uid_t, gid_t): check if defined.nobu
* intern.h, process.c, rubyio.h, ext/etc/etc.c, ext/pty/pty.c: use rb_{pid,uid,gid}_t instead of plain int. [ruby-dev:30376] * ext/etc/extconf.rb (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM, NUM2GIDT): moved to configure.in. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-22* rubyio.h (rb_io_set_nonblock): declared.akr
* io.c (rb_io_set_nonblock): new function. (io_getpartial): nonblocking read support. (io_read_nonblock): new method: IO#read_nonblock. (io_write_nonblock): new method: IO#write_nonblock. * ext/socket/socket.c (s_accept): retry for EWOULDBLOCK. revert [ruby-talk:113807]. (sock_connect_nonblock): new method: Socket#connect_nonblock. (sock_accept_nonblock): new method: Socket#accept_nonblock. (sock_recvfrom_nonblock): new method: Socket#recvfrom_nonblock. [ruby-core:7917] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]ocean
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c, gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h, node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h, rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c, util.c, util.h, variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18* rubyio.h (FMODE_WSPLIT, FMODE_WSPLIT_INITIALIZED): new constant.akr
* io.c (wsplit_p): new function. (io_fflush): split writing data by PIPE_BUF if wsplit_p is true in multi-threaded mode. (io_fwrite): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-30* configure.in (RUBY_FUNC_ATTRIBUTE): check for function attribute.nobu
[ruby-dev:26109] * eval.c, gc.c: moved noinline to configure.in. * rubyio.h (DEPRECATED): moved to configure.in. * ruby.h (DEPRECATED, NOINLINE): default definition. * win{32,ce}/Makefile.sub (config.h): deprecated and noinline for __declspec() are available for VC++7 or later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-07* io.c (io_getc): flush rb_stdout before read fro stdin, which isakr
connected to a tty. [ruby-core:4378] * rubyio.h (FMODE_TTY): renamed from FMODE_LINEBUF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-30* rubyio.h: don't deprecate rb_read_check.akr
* io.c (STDIO_READ_DATA_PENDING): reverted from old READ_DATA_PENDING to check stdio read buffer. (rb_read_check): use STDIO_READ_DATA_PENDING. (rb_read_pending): ditto. (rb_getc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* rubyio.h: rename FMODE_UNSEEKABLE to FMODE_DUPLEX.akr
* io.c (io_check_tty): extracted function to set FMODE_LINEBUF and FMODE_DUPLEX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08* rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c:akr
create FILE object only when required: popen(3) and DL's IO#to_ptr. [ruby-dev:25122] * io.c (rb_io_binmode): use setmode for Human68k. [ruby-dev:25121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07* io.c (io_fwrite): avoid context switch before writing to stderr.akr
[ruby-dev:25080] * rubyio.h: refine deprecated declaration. * configure.in, file.c, io.c: remove useless check: fseeko, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* rubyio.h, intern.h, io.c, file.c, process.c, ext/socket/socket.c,akr
ext/pty/pty.c, ext/io/wait/wait.c, ext/openssl/ossl_ssl.c: Use own buffering mechanism instead of stdio. * io.c, ext/stringio/stringio.c, test/ruby/ut_eof.rb: EOF flag removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19* string.c (str_gsub): internal buffer should not be listed bymatz
ObjectSpace.each_object() by String#gsub. [ruby-dev:24931] * lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise exception if data corresponding to session specified from the client does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18* io.c, rubyio.h (rb_io_modenum_flags): exported.nobu
* ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as well as IO.new does. [ruby-dev:24896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29* io.c (rb_io_check_initialized): new function to check uninitializednobu
object. [ruby-talk:118234] * file.c (rb_file_path), io.c (rb_io_closed): check if initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-18* io.c (rb_io_flags_mode, rb_io_mode_flags): distinguish whether filenobu
not existing is created. [ruby-dev:24505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_mode_flags): preserve append mode flag.matz
[ruby-dev:24436] * io.c (rb_io_modenum_mode): do not use external output buffer. * string.c (rb_str_justify): differ pointer retrieval to prevent padding string modification. [ruby-dev:24434] * range.c (range_each_func): allow func to terminate loop by returning RANGE_EACH_BREAK. * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-12* rubyio.h (rb_eof_error): should mark as NORETURN.usa
* win32/win32.c (make_cmdvector): adjust escaped successive double-quote handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07* file.c (rb_get_path): get path string via "to_path" method ifmatz
path object is not a string. [Ruby2] * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the exit finalizers. * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-25* gc.c (obj_free), io.c (rb_io_fptr_finalize), rubyio.h (OpenFile):nobu
sharing OpenFile. * io.c (rb_io_initialize): accept IO instance. [ruby-dev:22195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-14* rubyio.h (struct OpenFile): add error raise flag to finalizer.matz
* io.c (Init_IO): define $/, $-0, and $\ as string-only variables. * string.c (rb_str_split_m): does not generate empty string if there's no match in the receiver. * io.c (fptr_finalize): should raise error on EBADF for readable IOs as well. * file.c (rb_stat): use rb_check_convert_type() to retrieve IO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16Updated Copyrights of Matz to 2003.michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20* io.c (rb_io_fwrite): separated from io_write().nobu
* marshal.c (w_byten): use rb_io_fwrite() to support non-blocking IO, and added error check. * rubyio.h: prototypes; rb_io_fwrite git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02* configure.in (RUBY_CHECK_IO_NEED_FLUSH): check whether fflush()nobu
is needed. * io.c (flush_before_seek): flush before seek if buffered data may remain. * io.c (rb_io_check_readable): flush if the last operation was write. * io.c (rb_io_check_writable): flush if the last operation was read. * rubyio.h (FMODE_RBUF): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02* io.c (rb_io_wait_readable): handle retryable errors.nobu
* io.c (rb_io_wait_writable): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * ext/socket/socket.c (s_accept): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/getaddrinfo.c (afdl): made private structures constant. * rubyio.h: prototype; rb_io_wait_readable(), rb_io_wait_writable(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-16* io.c (rb_io_fread): renamed from io_fread and made extern.nobu
* marshal.c (r_bytes0): check if successfully read, use rb_io_fread() instead of fread() to be preemptive. (ruby-bugs-ja:PR#294, 295) * rubyio.h (rb_io_fread): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14* eval.c (rb_clear_cache_by_class): new function.matz
* eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-15* pack.c (pack_unpack): should treat 'U' in character unit, not inmatz
byte unit. * error.c (exc_initialize): should clear backtrace information. * io.c (rb_io_fptr_cleanup): should close IO created by IO.new(fd). * rubyio.h: remove FMODE_FDOPEN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01* re.c (match_setter): it's OK to assign nil to $~.matz
* io.c (rb_io_fptr_cleanup): do not close IO created by for_fd(). * io.c (rb_io_initialize): mark IO created by for_fd * ext/socket/socket.c (bsock_s_for_fd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-07* io.c (io_write): flag when buffered write is done.matz
* io.c (fptr_finalize): do not raise error on EBADF if write buffer is empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-17* intern.h: add prototypes.nobu
rb_gc_enable(), rb_gc_disable(), rb_gc_start(), rb_str_new5() rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(), rb_str_dup_frozen() * ruby.h: added declaration. rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo * rubyio.h: changed double include guard macro to RUBYIO_H. * array.c (inspect_call): make static. * eval.c (dvar_asgn): ditto. * io.c (rb_io_close_read): ditto. * lex.c (rb_reserved_word): ditto. * ruby.c: (req_list_head, req_list_last): ditto. * ruby.c (require_libraries): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-03* marshal.c (r_object): better allocation type check formatz
TYPE_UCLASS. usage of allocation framework is disabled for now. * variable.c (rb_class_path): Module may have subclass. * string.c (rb_str_update): should maintain original negative offset. * string.c (rb_str_subpat_set): ditto * string.c (rb_str_aset): ditto. * re.c (rb_reg_nth_match): should check negative nth. * re.c (rb_reg_nth_defined): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-02* eval.c (block_pass): should not downgrade safe level.matz
* ext/dbm/extconf.rb: allow specifying dbm-type explicitly. * ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks memory, whereas gdbm.so doesn't. potential incompatibility. * string.c (rb_str_insert): new method. * parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG. * array.c (rb_ary_insert): new method. * array.c (rb_ary_update): new utility function. * io.c (set_outfile): should check if closed before assignment. * eval.c (rb_eval): should preserve value of ruby_errinfo. * eval.c (rb_thread_schedule): infinite sleep should not cause dead lock. * array.c (rb_ary_flatten_bang): proper recursive detection. * eval.c (yield_under): need not to prohibit at safe level 4. * pack.c (pack_pack): p/P packs nil into NULL. * pack.c (pack_unpack): p/P unpacks NULL into nil. * pack.c (pack_pack): size check for P template. * ruby.c (set_arg0): wrong predicate when new $0 value is bigger than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. * regex.c (re_compile_pattern): char class at either edge of range should be invalid. * eval.c (handle_rescue): use === to compare exception match. * error.c (syserr_eqq): comparison between SytemCallErrors should based on their error numbers. * eval.c (safe_getter): should use INT2NUM(). * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. * regex.c (calculate_must_string): wrong length calculation. * eval.c (rb_thread_start_0): fixed memory leak. * parse.y (none): should clear cmdarg_stack too. * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. * file.c (rb_stat_dev): device functions should honor stat field types (except long long such as dev_t). * eval.c (rb_mod_nesting): should not push nil for nesting array. * eval.c (rb_mod_s_constants): should not search array by rb_mod_const_at() for nil (happens for singleton class). * class.c (rb_singleton_class_attached): should modify iv_tbl by itself, no longer use rb_iv_set() to avoid freeze check error. * variable.c (rb_const_get): error message "uninitialized constant Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". * eval.c (rb_mod_included): new hook called from rb_mod_include(). * io.c (opt_i_set): should strdup() inplace_edit string. * eval.c (exec_under): need to push cref too. * eval.c (rb_f_missing): raise NameError for "undefined local variable or method". * error.c (Init_Exception): new exception NoMethodError. NameError moved under ScriptError again. * eval.c (rb_f_missing): use NoMethodError instead of NameError. * file.c (Init_File): should redifine "new" class method. * eval.c (PUSH_CREF): sharing cref node was problematic. maintain runtime cref list instead. * eval.c (rb_eval): copy defn node before registering. * eval.c (rb_load): clear ruby_cref before loading. * variable.c (rb_const_get): no recursion to show full class path for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE DST! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * eval.c (proc_eq): class check aded. * eval.c (proc_eq): typo fixed ("return" was ommitted). * error.c (Init_Exception): move NameError under StandardError. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. * file.c (check3rdbyte): safe string check moved here. * time.c (make_time_t): remove HAVE_TM_ZONE code since it sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * process.c (proc_waitall): should push Process::Status instead of Finuxm status. * process.c (waitall_each): should add all entries in pid_tbl. these changes are inspired by Koji Arai. Thanks. * process.c (proc_wait): should not iterate if pid_tbl is 0. * process.c (proc_waitall): ditto. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * io.c (Init_IO): value of $/ and $\ are no longer restricted to strings. type checks are done on demand. * class.c (rb_include_module): module inclusion should be check taints. * ruby.h (STR2CSTR): replace to StringType() and StringTypePtr(). * ruby.h (rb_str2cstr): ditto. * eval.c (rb_load): should not copy topleve local variables. It cause variable/method ambiguity. Thanks to L. Peter Deutsch. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-14* dir.c (dir_s_glob): supprt backslash escape of metacharactersmatz
and delimiters. * dir.c (remove_backslases): remove backslashes from path before calling stat(2). * dir.c (dir_s_glob): call rb_yield directly (via push_pattern) if block is given to the method. * dir.c (push_pattern): do not call rb_ary_push; yield directly. * eval.c (blk_copy_prev): reduced ALLOC_N too much. * eval.c (frame_dup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-10matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-012000-05-01matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-232000-03-23matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-012000-02-01matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-01-172000-01-17matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-01-0520000105matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-09-2019990920matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-131.4.0matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e