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

[PATCH] SWIG binding for better access to svn_client_get_changelists

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: Sat, 5 Jan 2008 12:39:18 -0800

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
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-01-05 21:39:29 CET

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.