You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joe Swatosh <jo...@gmail.com> on 2008/01/05 20:39:18 UTC

[PATCH] SWIG binding for better access to svn_client_get_changelists

I can't build or test the Python or Perl bindings so I wanted to request some
comments rather than just committing it.
--
Joe

[[[

Add a new typemap that will allow taking advantage of cmpilato's changes to
the svn_client_get_changelists api which will return all the changelists if
the list is NULL.

* subversion/bindings/swig/include/svn_containers.swg: New typemap
   STRINGLIST_MAY_BE_NULL for Ruby.

* subversion/bindings/swig/svn_client.i: Remove the apply of STRINGLIST to
   changelists and apply STRINGLIST_MAY_BE_NULL to changelists.

]]]


Index: subversion/bindings/swig/include/svn_containers.swg
===================================================================
--- subversion/bindings/swig/include/svn_containers.swg	(revision 28750)
+++ subversion/bindings/swig/include/svn_containers.swg	(working copy)
@@ -448,6 +448,10 @@
 %typemap(in) const apr_array_header_t *STRINGLIST {
   $1 = svn_swig_rb_strings_to_apr_array($input, _global_pool);
 }
+%typemap(in) const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
+  $1 = (NIL_P($input)) ? NULL :
+    svn_swig_rb_strings_to_apr_array($input, _global_pool);
+}
 #endif

 /* svn_delta_path_driver() mutates its 'paths' argument (by sorting it),
Index: subversion/bindings/swig/svn_client.i
===================================================================
--- subversion/bindings/swig/svn_client.i	(revision 28750)
+++ subversion/bindings/swig/svn_client.i	(working copy)
@@ -68,7 +68,10 @@
 #endif

 %apply const apr_array_header_t *STRINGLIST {
-  apr_array_header_t *src_paths,
+  apr_array_header_t *src_paths
+}
+
+%apply const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
   apr_array_header_t *changelists
 }

Re: [PATCH] SWIG binding for better access to svn_client_get_changelists

Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
2008-01-05 21:38:55 Joe Swatosh napisaƂ(a):
> I can't build or test the Python or Perl bindings so I wanted to request some
> comments rather than just committing it.
> --
> Joe
> 
> [[[
> 
> Add a new typemap that will allow taking advantage of cmpilato's changes to
> the svn_client_get_changelists api which will return all the changelists if
> the list is NULL.
> 
> * subversion/bindings/swig/include/svn_containers.swg: New typemap
>    STRINGLIST_MAY_BE_NULL for Ruby.
> 
> * subversion/bindings/swig/svn_client.i: Remove the apply of STRINGLIST to
>    changelists and apply STRINGLIST_MAY_BE_NULL to changelists.
> 
> ]]]
> 
> 
> Index: subversion/bindings/swig/include/svn_containers.swg
> ===================================================================
> --- subversion/bindings/swig/include/svn_containers.swg	(revision 28750)
> +++ subversion/bindings/swig/include/svn_containers.swg	(working copy)
> @@ -448,6 +448,10 @@
>  %typemap(in) const apr_array_header_t *STRINGLIST {
>    $1 = svn_swig_rb_strings_to_apr_array($input, _global_pool);
>  }
> +%typemap(in) const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
> +  $1 = (NIL_P($input)) ? NULL :
> +    svn_swig_rb_strings_to_apr_array($input, _global_pool);
> +}
>  #endif
> 
>  /* svn_delta_path_driver() mutates its 'paths' argument (by sorting it),
> Index: subversion/bindings/swig/svn_client.i
> ===================================================================
> --- subversion/bindings/swig/svn_client.i	(revision 28750)
> +++ subversion/bindings/swig/svn_client.i	(working copy)
> @@ -68,7 +68,10 @@
>  #endif
> 
>  %apply const apr_array_header_t *STRINGLIST {
> -  apr_array_header_t *src_paths,
> +  apr_array_header_t *src_paths
> +}
> +
> +%apply const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
>    apr_array_header_t *changelists
>  }
> 

I'm confirming that Python, Perl and Ruby bindings build correctly with this patch.

-- 
Arfrever Frehtes Taifersar Arahesis

Re: [PATCH] SWIG binding for better access to svn_client_get_changelists

Posted by Joe Swatosh <jo...@gmail.com>.
Hi

On Jan 5, 2008 3:15 PM, John Peacock <jo...@havurah-software.org> wrote:
> Joe Swatosh wrote:
> > I can't build or test the Python or Perl bindings so I wanted to request some
> > comments rather than just committing it.
>
> Yeah, that works better than what I was playing with.  I say go ahead and commit
> it (but then I'm not a full committer either)...
>
> John
>

No one complained so commited r28819.

--
Joe

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

Re: [PATCH] SWIG binding for better access to svn_client_get_changelists

Posted by John Peacock <jo...@havurah-software.org>.
Joe Swatosh wrote:
> I can't build or test the Python or Perl bindings so I wanted to request some
> comments rather than just committing it.

Yeah, that works better than what I was playing with.  I say go ahead and commit
it (but then I'm not a full committer either)...

John

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

Re: [PATCH] SWIG binding for better access to svn_client_get_changelists

Posted by Joe Swatosh <jo...@gmail.com>.
Doh

On Jan 5, 2008 12:39 PM, Joe Swatosh <jo...@gmail.com> wrote:
> I can't build or test the Python or Perl bindings so I wanted to request some
> comments rather than just committing it.
> --
> Joe
>
> [[[
>
> Add a new typemap that will allow taking advantage of cmpilato's changes to
> the svn_client_get_changelists api which will return all the changelists if
> the list is NULL.
>

I meant to include that an alternative to this would be to just change
the definition
of the existing STRINGLIST to allow NULL....

--
Joe

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