You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Berlin <da...@dberlin.org> on 2002/02/05 18:54:10 UTC

[PATCH]: Add bindings for SVN/APR time functions

Unfortunately (somewhat), we need to generate bindings for svn_time.h and 
apr_time.h, because to set the proper date on imported revisions, we have 
to use apr_ansi_time_to_apr_time, then svn_time_to_nts.


This ugly conversion looks like:
   newdate = _util.svn_time_to_nts(_util.apr_ansi_time_to_apr_time(time)[1], pool)
Yum.

Next, i'll see about not using svn_stringbuf everywhere.

 2002-02-05  Daniel Berlin  <da...@dberlin.org>

	* util.i: Generate bindings for svn_time and apr_time, we need
	them for date support in cvs2svn.py.

	* apr.i : Add a time_t definition, so we don't need to include
	time.h.
	(long long typemaps): Change long long to apr_time_t, since SWIG will support
	long long soon, and we really only want to do this stuff for
	apr_time_t anyway.
	


Index: ./apr.i
===================================================================
--- ./apr.i
+++ ./apr.i	Tue Feb  5 13:47:17 2002
@@ -43,25 +43,25 @@
 
 /* Define the time type (rather than picking up all of apr_time.h) */
 typedef apr_int64_t apr_time_t;
-
+typedef apr_int32_t time_t;
 /* -----------------------------------------------------------------------
-   handle long long values so that apr_time_t works well
-*/
+  Don't generalize these to long long. SWIG is scheduled to have
+  long long support RSN, and we don't want to tangle the two.  */
 
-%typemap(python,in) long long {
+%typemap(python,in) apr_time_t {
     $1 = PyLong_AsLongLong($input);
 }
 
-/* 'long long *' will always be an OUTPUT parameter */
-%typemap(ignore) long long * (long long temp) {
+/* 'apr_time_t *' will always be an OUTPUT parameter */
+%typemap(ignore) apr_time_t * (apr_time_t temp) {
     $1 = &temp;
 }
-%typemap(python,argout) long long * {
+%typemap(python,argout) apr_time_t * {
     $result = t_output_helper($result, PyLong_FromLongLong(*$1));
 }
 
 /* deal with return a return value */
-%typemap(python,out) long long {
+%typemap(python,out) apr_time_t {
     $result = t_output_helper($result, PyLong_FromLongLong($1));
 }
 
Index: ./util.i
===================================================================
--- ./util.i
+++ ./util.i	Tue Feb  5 13:41:17 2002
@@ -121,6 +121,8 @@
 %include svn_io.h
 %include svn_pools.h
 %include svn_version.h
+%include svn_time.h
+%include apr_time.h
 %{
 #include <apr.h>
 #include <apr_general.h>
@@ -128,4 +130,5 @@
 #include "svn_pools.h"
 #include "svn_version.h"
 #include "swigutil.h"
+#include "svn_time.h"
 %}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: config/tarball status (was: [PATCH]: Add bindings for SVN/APR time functions)

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> Over the weekend, I was testing out some clean builds. Found a couple issues
> with VPATH builds, and checked those in today.
> 
> We still have a bit of tweakiness with already-installed-APR, which I might
> clear up, or document somehow. Need to investigate what kind of fixes can be
> made.
> 
> I may get to this stuff tonite. If not, I think we're still okay as far as
> tarballs go (like I said, we may be able to just doc around any issues).
> Tue/Wed, I've got some other work that I'll need to do for Collab.

Okay, thanks for the update.

Will roll tomorrow then, and depending what comes up in testing we can
doc or fix as appropriate.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

config/tarball status (was: [PATCH]: Add bindings for SVN/APR time functions)

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Feb 11, 2002 at 08:29:50PM -0600, Karl Fogel wrote:
> Greg, you've probably been working the most (?) on the configuration
> problems we were seeing.  What's the status on those right now?
> 
> We didn't roll a tarball today, but we should tomorrow unless there's
> something precluding it... 

Over the weekend, I was testing out some clean builds. Found a couple issues
with VPATH builds, and checked those in today.

We still have a bit of tweakiness with already-installed-APR, which I might
clear up, or document somehow. Need to investigate what kind of fixes can be
made.

I may get to this stuff tonite. If not, I think we're still okay as far as
tarballs go (like I said, we may be able to just doc around any issues).
Tue/Wed, I've got some other work that I'll need to do for Collab.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH]: Add bindings for SVN/APR time functions

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg, you've probably been working the most (?) on the configuration
problems we were seeing.  What's the status on those right now?

We didn't roll a tarball today, but we should tomorrow unless there's
something precluding it... 

(Not to say that the dist is waiting on just the config stuff --
there's still "svn switch" work going on, which I should have been
more active in helping Ben with today, <M-x self-castigation-mode>,
sorry, Ben)

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH]: Add bindings for SVN/APR time functions

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Feb 05, 2002 at 01:54:10PM -0500, Daniel Berlin wrote:
> Unfortunately (somewhat), we need to generate bindings for svn_time.h and 
> apr_time.h, because to set the proper date on imported revisions, we have 
> to use apr_ansi_time_to_apr_time, then svn_time_to_nts.

I've applied this patch, but I removed the "apr_time.h" include, and
simplified the typemaps for apr_time_t by using SWIG's built in long long
typemaps (e.g. we require SWIG 1.3.11 now).

Thanks for the patch!

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org