[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Ruby bindings' Svn::Core::Dirent#time returns Time instead of Bignum

From: Kobayashi Noritada <nori1_at_dolphin.c.u-tokyo.ac.jp>
Date: 2006-06-10 07:56:27 CEST

Hi,

Currently in the SWIG/Ruby bindings, Svn::Core::Dirent#time returns
Bignum, which needs conversion when used as Time. This patch makes
it directly return an Time instance, which I think is better.

Thanks,

-nori

[[[
* subversion/bindings/swig/ruby/svn/core.rb
  (Svn::Core::Dirent#time): Return Time instead of Bignum.
]]]

Index: subversion/bindings/swig/ruby/svn/core.rb
===================================================================
--- subversion/bindings/swig/ruby/svn/core.rb (revision 20034)
+++ subversion/bindings/swig/ruby/svn/core.rb (working copy)
@@ -335,6 +335,12 @@
       def unknown?
         kind == NODE_UNKNOWN
       end
+
+ alias _time time
+ def time
+ __time = _time
+ __time && Time.from_apr_time(__time)
+ end
     end
 
     Config = SWIG::TYPE_p_svn_config_t

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 10 07:57:01 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.