aboutsummaryrefslogtreecommitdiffstats
path: root/time.c
Commit message (Collapse)AuthorAgeFilesLines
* * proc.c (proc_lambda, unnamed_parameters): Small documentation fixes.marcandre2010-05-171-8/+2
| | | | | | | | | | * re.c: ditto * string.c: ditto * time.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-93/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_big_abs_find_minbit): use ffs().akr2010-05-121-1/+1
| | | | | | | | | | | | * configure.in: check ffs(). * missing/ffs.c: new file. * include/ruby/missing.h (ffs): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_big_abs_find_minbit): get rid of a warning of VC.usa2010-05-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_localtime_r2): get rid of infinite loop bug ofnobu2010-05-061-0/+3
| | | | | | localtime() on x86_64-darwin. [ruby-core:30031] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (TIMET_MAX): should be time_t, not unsigned_time_t.usa2010-04-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_unmagnify_to_float): should cast.usa2010-04-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_timespec): use rb_check_funcall.nobu2010-04-281-6/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-04-111-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (ASCTIME): unused macro removed.akr2010-04-071-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: test localtime(3) overflow. [ruby-dev:40910]akr2010-04-061-14/+45
| | | | | | | | | | | | * time.c (rb_gmtime_r): renamed from rb_gmtime. (rb_localtime_r): renamed from rb_localtime. (rb_localtime_r2): call rb_localtime_r and validate the result if there is overflow problem. (rb_gmtime_r2): call rb_gmtime_r and validate the result if there is overflow problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (cmp): optimize for fixnums.akr2010-04-041-51/+41
| | | | | | | | | | | | | | | (lt): use cmp. (gt): ditto. (le): ditto. (ge): ditto. (wlt): use wcmp. (wgt): ditto. (wle): ditto. (wge): ditto. (time_subsec): use wmod. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (lt): call <=> instead of <.akr2010-04-041-6/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: don't define STRUCT_WIDEVAL.akr2010-04-031-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_big_abs_find_minbit): fix handling the last word.akr2010-03-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (long_mul): overflow condition changed.akr2010-03-311-4/+4
| | | | | | | (wi_mul): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (long_mul): extracted from mul and avoid integer overflow.akr2010-03-311-30/+106
| | | | | | | (wi_mul): extracted from wmul and avoid integer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: less bignum allocations.akr2010-03-311-141/+266
| | | | | | | | | * strftime.c (rb_strftime_timespec): defined to avoid rational for nano second resolution time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (timew2timespec): fix previous change.akr2010-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (wdivmod): renamed from wdivmodv. fix neg/pos and pos/neg.akr2010-03-301-31/+76
| | | | | | | | | | (split_second): return number of seconds as wideval_t. (timet2wv): new function. (wv2timet): new function. (timet2wideval): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: use more polymorphic operations.akr2010-03-301-24/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: reorder wide value implementation.akr2010-03-301-103/+104
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: make wide value more polymorphic.akr2010-03-301-100/+102
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix previous commit for LP64.akr2010-03-301-2/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (w2v): renamed from w2xv.akr2010-03-301-89/+97
| | | | | | | | | (v2w): renamed from xv2w. (rb_time_magnify): takes wideval_t. (rb_time_unmagnify): returns wideval_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-03-301-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: wide value condition changed.akr2010-03-291-122/+128
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_magnify): fix for LP64.akr2010-03-281-2/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: rename small integer specialization related identifiers.akr2010-03-281-158/+158
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (weq): optimize for small integer.akr2010-03-271-12/+84
| | | | | | | | | | | | | | | (wne): ditto. (wlt): ditto. (wgt): ditto. (wle): ditto. (wge): ditto. (rb_time_magnify): ditto. (rb_time_unmagnify): ditto. (rb_time_unmagnify_to_float): new function to avoid rational for Time#to_f and Time#-. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (mul): condition refined.akr2010-03-271-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: fix previos commit.akr2010-03-271-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: use 64bit arithmetic even on platforms with 32bit VALUE.akr2010-03-271-142/+477
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_round): new method Time#round. [ruby-dev:40595]akr2010-03-111-0/+60
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_add): propagate fixed time offset.akr2010-02-151-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mdump, time_mload): dump/load utc_offset.nobu2010-02-031-3/+23
| | | | | | | [ruby-dev:40063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (quo, time_mdump): use RRATIONAL().nobu2010-02-031-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add comment.akr2010-02-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mload): add submicro into vtm.subsecx. [ruby-dev:40133] akr2010-01-221-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_to_r): convert to rational if internal representationakr2010-01-131-1/+6
| | | | | | | is not rational. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2010-01-131-0/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mdump): use nano_num and nano_den instead of subnano toakr2010-01-131-18/+32
| | | | | | | | | avoid Rational class in marshaled data which prevent unmarshal by Ruby 1.8. (time_mload): use nano_num and nano_den. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (num_exact): should not accept strings as operands, evenmatz2009-12-041-2/+5
| | | | | | | | though they respond to #to_r. ideally, strict rational conversion should be done by a method like #to_rational, not #to_r. [ruby-core:23729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * removed spaces just before tabs.nobu2009-11-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: rdoc for <=>, casecmpmarcandre2009-10-281-1/+1
| | | | | | | | | | | | * bignum.c: rdoc for <=> * file.c: ditto * time.c: ditto * compar.c: rdoc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_succ): make Time#succ obsolete since time is notmatz2009-09-301-7/+6
| | | | | | | | | | a discrete value. * range.c (discrete_object_p): treat time objects specially to determine discrete values, since time objects have #succ yet are discrete (for now at least). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: fixed type.nobu2009-09-231-51/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_mdump): error message refined.akr2009-09-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (rb_time_timeval, rb_time_timespec): typed.nobu2009-09-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e