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

[patch] Getting the Ruby Binding test of Svn::Ext::Wc::set_changelist to pass when generated with SWIG 1.3.24

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-04-12 04:48:25 CEST

Mimic what kou did for svn_client_remove_from_changelist() to allow
null arguments
for svn_wc_set_changelist().

--
Joe
[[[
Accept NULL as changelist and matching_changelist arguments of
svn_wc_set_changelist().
* subversion/bindings/swig/svn_wc.i
  (%ignore svn_wc_set_changelist,
   %apply const char *MAY_BE_NULL,
   _svn_wc_set_changelist): Accept NULL as changelist
  name argument of svn_wc_set_changelist().
]]]
Index: subversion/bindings/swig/svn_wc.i
===================================================================
--- subversion/bindings/swig/svn_wc.i   (revision 24543)
+++ subversion/bindings/swig/svn_wc.i   (working copy)
@@ -47,6 +47,8 @@
 %ignore svn_wc_init_traversal_info;
 %ignore svn_wc_entry;
 %ignore svn_wc_notify;
+
+%ignore svn_wc_set_changelist;
 #endif
 /* -----------------------------------------------------------------------
@@ -133,6 +135,14 @@
 #endif
+#ifdef SWIGRUBY
+%apply const char *NOT_NULL {
+  const char *changelist,
+  const char *matching_changelist
+};
+#endif
+
+
 /* svn_wc_translated2() */
 #ifdef SWIGRUBY
 %apply const char **TO_TEMP_FILE {
@@ -186,6 +196,29 @@
 %include svn_wc_h.swg
+
+#ifdef SWIGRUBY
+%header %{
+#define _svn_wc_set_changelist svn_wc_set_changelist
+%}
+%rename(svn_wc_set_changelist) _svn_wc_set_changelist;
+%apply const char *MAY_BE_NULL {
+  const char *changelist_may_be_null,
+  const char *matching_changelist_may_be_null
+}
+svn_error_t *
+_svn_wc_set_changelist(const apr_array_header_t *paths,
+                      const char *changelist_may_be_null,
+                      const char *matching_changelist_may_be_null,
+                      svn_cancel_func_t cancel_func,
+                      void *cancel_baton,
+                      svn_wc_notify_func2_t notify_func,
+                      void *notify_baton,
+                      apr_pool_t *pool);
+#endif
+
+
+
 %inline %{
 static svn_error_t *
 svn_wc_swig_init_asp_dot_net_hack (apr_pool_t *pool)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 12 04:48:47 2007

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.