summaryrefslogtreecommitdiffstats
path: root/include/ruby/ruby.h
Commit message (Collapse)AuthorAgeFilesLines
* * include/ruby/ruby.h (RREGEXP_SRC_END): added.naruse2009-12-301-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_bug_errno): declared.akr2009-11-241-0/+1
| | | | | | | | | | | | | | | | * include/ruby/intern.h (rb_strerrno): declaration removed. * error.c (rb_strerrno): make it static. return NULL for unknown errors. (rb_bug_errno): defined. * thread_pthread.c: use rb_bug_errno. * signal.c (ruby_signal): use rb_bug_errno. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_classext_t): annotate @internal.mame2009-11-151-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (NUM2CHR): prefix __extension__ forshyouhei2009-11-041-1/+1
| | | | | | | braced-groups within expressions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RSTRING_END): trivial optimization.nobu2009-10-291-1/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RB_GC_GUARD_PTR): workaround for gccnobu2009-10-111-1/+7
| | | | | | | optimization. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (ruby_exec_node): declared.nobu2009-10-101-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_long2int): evalates the argument onlynobu2009-10-071-1/+1
| | | | | | | | | once. * struct.c (rb_struct_alloc): check array length overflow. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_type): forward declaration to suppress anobu2009-09-181-0/+1
| | | | | | | warning. a patch from Naohisa Goto at [ruby-dev:39350] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RB_TYPE_P): should not use BUILTIN_TYPE fornobu2009-09-141-1/+1
| | | | | | | special constants. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),usa2009-09-141-62/+62
| | | | | | | | | (LONG2NUM, ULONG2NUM, NUM2CHR): get rid of backward references of macros. the code couldn't compile by VC. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (XLDFLAGS): link startup code with ObjC support.nobu2009-09-131-2/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_special_const_p): fixed typo.nobu2009-09-131-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (SYM2ID): needs parens.nobu2009-09-131-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),nobu2009-09-131-13/+70
| | | | | | | | (LONG2NUM, ULONG2NUM, NUM2CHR, rb_type_p, rb_special_const_p): GCC specific optimization. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_t): Add comments.ko12009-09-101-1/+4
| | | | | | | | | And add a member variable "data", a multi-purpose storage area for rb_data_type. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_struct): constified dsize.nobu2009-09-091-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_check_safe_str): deprecated.nobu2009-08-141-1/+1
| | | | | | | | * ext/openssl/ossl_x509store.c (ossl_x509store_add_{file,path}): replaced deprecated funtion. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: reject unused longlife gc.nari2009-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | * debug.c: ditto. * include/ruby/intern.h: ditto. * include/ruby/ruby.h: ditto. * iseq.c: ditto. * node.h: ditto. * vm_insnhelper.c: ditto. * vm_insnhelper.h: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h:ko12009-07-071-9/+9
| | | | | | | | | | | | | | rename "...TypeStruct" and "typed_struct" to "TypedData..." and "typeddata", respectively. rename rb_data_type_t#name to rb_data_type_t#wrap_struct_name. * error.c, gc.c, iseq.c, vm.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_typed_struct_is_kind_of): new function to see if thenobu2009-07-071-0/+2
| | | | | | | given typed struct. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_check_typed_struct): new function to check typednobu2009-07-071-0/+6
| | | | | | | | | | struct. * include/ruby/ruby.h (Check_TypedStruct, Data_Get_TypedStruct): new macro to check typed struct. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_get_path_check): check with given safe level.nobu2009-06-231-0/+1
| | | | | | | | | * file.c (rb_find_file_ext_safe, rb_find_file_safe): ditto. * safe.c (rb_insecure_operation): function to raise security error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: New structure RTypedData, added.ko12009-06-161-0/+30
| | | | | | | | | | | | | | | | | | | This structure incldues more explicit type information for T_DATA objects. If RData(obj)->dfree is immediate value `1' on T_DATA object obj, obj is needed to be accessed with RTYPEDDATA(obj) instead of RDATA(obj). A RTypedData structure points the structure rb_typed_data_t. rb_typed_data_t includes information such as the type name of this data, mark and free function what RData includes, and memsize function show how data consuming the memory size. Note that you do not need any change existing T_DATA objects. If you use RDataType instead of RData on T_DATA object, you can specify explicit type information. * gc.c (rb_data_typed_object_alloc, rb_objspace_data_type_memsize, rb_objspace_data_type_name): added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (FilePathValue): prevent from GC.nobu2009-05-251-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (NUM2LONG): added GCC specific optimization.nobu2009-05-251-2/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RB_EVENT_HOOKS_HAVE_CALLBACK_DATA):nobu2009-05-211-0/+1
| | | | | | | new macro for compatibility check. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_long2int, RARRAY_LENINT): check long tonobu2009-05-201-0/+19
| | | | | | | | | cast to int. [ruby-dev:38508] * struct.c, vm_eval.c, vm_insnhelper.c: use RARRAY_LENINT. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add longlife garbage collection. [ruby-dev:38423]nari2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (NORMAL_HEAPS_USED): new macro. (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto. (add_longlife_heaps_slot): new function. (rb_newobj_from_longlife_heap): ditto. (rb_newobj_longlife): ditto. (rb_node_newnode_longlife): ditto. (rb_gc_write_barrier): ditto. (remembered_set_recycle): ditto. (rb_gc_mark_remembered_set): ditto. (clear_mark_longlife_heaps): ditto. (gc_sweep_for_longlife): ditto. (assign_heap_slot): new argumnent to longlife heaps slot. (add_freelist): ditto. (gc_sweep): avoid lonlife heap slot. set longlife_collection flag at add heap. (rb_gc_force_recycle): avoid mark object and remembered_set object. (garbage_collect): add longlife collection. (rb_gc_start): invoke longlife collection. (gc_profile_record_get): for longlife collction profile. (gc_profile_result): ditto. * include/ruby/intern.h (rb_gc_write_barrier): declared. * include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED. * debug.c (FL_REMEMBERED_SET): ditto. * insns.def (setinlinecache): insert write barrier. * vm_insnhelper.c (vm_method_search): ditto. * set_relation (set_relation): use longlife object. * vm.c (vm_define_method): ditto. * vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto. * vm_method.c (rb_add_method): ditto. * class.c (rb_add_method): ditto. * node.h (NEW_NODE_LONGLIFE): new macro. (rb_node_newnode_longlife): declared. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_cleanup): the order of local variables on stack isnobu2009-04-191-2/+2
| | | | | | | | | | | | undefined. should use outermost VALUE for ruby_init_stack. * gc.c (ruby_get_stack_grow_direction, Init_stack): allows volatile pointer. * thread_*.c (ruby_init_stack): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_mWaitReadable): defined.akr2009-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.nobu2009-03-151-5/+5
| | | | | | | | | * include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int. * include/ruby/encoding.h (ENC_CODERANGE): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (bool): not define to get rid of conflictnobu2009-03-131-24/+2
| | | | | | | against curses. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (AC_HEADER_DIRENT): added.nobu2009-03-131-4/+33
| | | | | | | | | | | | * include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true and false instead of Qtrue and Qfalse for platforms where VALUE is bigger than int. * gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got rid of variables named `bool'. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (USE_SYMBOL_AS_METHOD_NAME): Module#methods,nobu2009-02-231-0/+3
| | | | | | | #singleton_methods and so on return Symbols. [ruby-talk:328775] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (STR2CSTR): removed.akr2009-01-311-5/+0
| | | | | | | | | | (rb_str2cstr): removed. * object.c (rb_str2cstr): removed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (VALUE): use unsigned long or long longnobu2009-01-161-3/+6
| | | | | | | instead of uintptr_t, since many %lx and so on are still used. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX): must define as string.usa2009-01-161-1/+1
| | | | | | | | | | | if not, cause compile error in using PRI?VALUE. * win32/Makefile.sub (config.h): add SIZEOF_INTPTR_T and SIZEOF_UINTPTR_T for SIZEOF_VALUE. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_REPLACE_TYPE): does not define rb_ prefixednobu2009-01-161-3/+26
| | | | | | | | | | | | | | name if no default type is given. * configure.in (RUBY_DEFINT): checks size. * include/ruby/ruby.h (VALUE): use uintptr_t if available. * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX): assumes usable if PRIdPTR is defined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/curses/curses.c: curses encoding should obey locale.matz2008-11-071-0/+1
| | | | | | | | * ext/curses/curses.c (curses_getch): 1.9 getch should return one character string for single byte string. wchar_t support may follow in the future. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (ExportStringValue): new macro to convertmatz2008-10-201-0/+6
| | | | | | | | | | | | | string in internal encoding to external to export. * string.c (rb_str_export): new function to do conversion to external encoding. * ext/sdbm/init.c: encoding conversion support. * ext/dbm/dbm.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (Init_IO): $FILENAME and $* must be read-only. [ruby-dev:36698]nobu2008-10-141-0/+20
| | | | | | | | | * variable.c (*_getter, *_setter, *_marker): made public. * include/ruby/ruby.h (rb_gvar_*_{getter,setter,marker}): declared. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: embeds the elements of an array into itsyugui2008-10-091-8/+25
| | | | | | | | | | | | | | | | | | struct RArray for # of elements <= 3. * array.c: ditto. * gc.c (gc_mark_children): following the change of struct RArray. * ext/tk/tcltklib.c (ip_ruby_cmp): ditto. * parse.y (coverage): ditto. * proc.c (curry): ditto. * .gdbinit: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c: Ruby no longer supports VMS.yugui2008-10-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * error.c: ditto. * eval.c: ditto. * eval_intern.h: ditto. * include/ruby/defines.h: ditto. * include/ruby/ruby.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * vms/config.h: removed. * vms/vms.h: ditto. * vms/vmsruby_private.c: ditto. * vms/vmsruby_private.h: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_mPrecision): removed.yugui2008-09-261-1/+0
| | | | | | Precision module was temporarily removed at r19430. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (Init_Exception): introduce EncodingError which is amatz2008-09-261-0/+1
| | | | | | | | | superclass for all encoding related exception classes, e.g. Encoding::CompatibilityError. [ruby-dev:36371] * transcode.c (Init_transcode): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: an instance method image has been removed andtadf2008-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | uses "imag" instead of "image". * complex.c: two instance method re and im are removed. * rational.c: follows the above changes. * include/ruby/ruby.h: ditto. * gc.c: ditto. * lib/cmath.rb: ditto. * lib/mathn.rb: ditto. * lib/complex.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: add "Error" suffix for Encoding exception classes.matz2008-09-181-0/+1
| | | | | | | | | | a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36346]. * encoding.c (Init_Encoding): rename EncodingCompatibilityError to Encoding::CompatibilityError. [ruby-dev:36366] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c, include/ruby/ruby.h: rename rb_register_mark_object()ko12008-09-151-1/+1
| | | | | | | | | | | | | | to rb_gc_register_mark_object(). * eval.c, vm.c: initialize vm->mark_object_ary at Init_top_self(). * bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c, io.c, load.c, marshal.c, rational.c, ruby.c, vm.c: use rb_gc_register_mark_object() instead of rb_global_variable() or rb_gc_register_address(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2008-09-091-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e