Hi,
In <41DAD46A.7010300@electricjellyfish.net>
"Re: [PATCH] Ruby SWIG-based bindings" on Tue, 04 Jan 2005 12:37:46 -0500,
Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> > I'm writing Ruby SWIG-based bindings.
> > http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050104.diff
> First of all, there seem to be some parts of the diff that change things
> that aren't specific to the ruby bindings,
Is it swapping %include position for #include position? (See
the attachment.)
> and the whole thing really
> needs a log message indicating what it's doing so that it can be more
> easily reviewed.
It is for SWIG-Ruby.
The codes generated by %include sometimes need some type
declarations. We have to use #include before the codes
generated by %include. So, I swapped %include position for
#include position.
> Second, the Svn::Client stuff seems a bit suboptimal to me. I don't
> really like how the Context object is being passed in manually to each
> function, it doesn't feel very object oriented. You might want to take
> a look at the way the perl bindings work, where there's a SVN::Client
> object that includes the context and automagically adds it to each
> method call. See subversion/bindings/swig/perl/native/Client.pm for
> details on how this is being done there.
Svn::Client is my next work.
Thanks for advice. It will be useful.
> All in all I think you're making good progress though, and I'd love to
> help get this committed and hopefully eventually get you access to
> maintain it directly in the tree.
Thanks.
--
kou
Index: subversion/bindings/swig/svn_ra.i
===================================================================
--- subversion/bindings/swig/svn_ra.i (revision 12591)
+++ subversion/bindings/swig/svn_ra.i (working copy)
@@ -96,7 +96,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_ra.h
%{
#include "svn_ra.h"
@@ -112,6 +111,7 @@
#include "swigutil_pl.h"
#endif
%}
+%include svn_ra.h
#ifdef SWIGPERL
%include ra_plugin.hi
Index: subversion/bindings/swig/core.i
===================================================================
--- subversion/bindings/swig/core.i (revision 12591)
+++ subversion/bindings/swig/core.i (working copy)
@@ -398,28 +398,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_types.h
-%include svn_pools.h
-%include svn_version.h
-%include svn_time.h
-%include svn_props.h
-%include svn_opt.h
-%include svn_auth.h
-%include svn_config.h
-%include svn_version.h
-
-
-/* SWIG won't follow through to APR's defining this to be empty, so we
- need to do it manually, before SWIG sees this in svn_io.h. */
-#define __attribute__(x)
-
-%include svn_io.h
-
-#ifdef SWIGPERL
-%include svn_diff.h
-%include svn_error.h
-#endif
-
%{
#include <apr.h>
#include <apr_general.h>
@@ -461,3 +439,25 @@
SubversionException = _core.SubversionException
%}
#endif
+
+%include svn_types.h
+%include svn_pools.h
+%include svn_version.h
+%include svn_time.h
+%include svn_props.h
+%include svn_opt.h
+%include svn_auth.h
+%include svn_config.h
+%include svn_version.h
+
+
+/* SWIG won't follow through to APR's defining this to be empty, so we
+ need to do it manually, before SWIG sees this in svn_io.h. */
+#define __attribute__(x)
+
+%include svn_io.h
+
+#ifdef SWIGPERL
+%include svn_diff.h
+%include svn_error.h
+#endif
Index: subversion/bindings/swig/svn_types.i
===================================================================
--- subversion/bindings/swig/svn_types.i (revision 12591)
+++ subversion/bindings/swig/svn_types.i (working copy)
@@ -479,7 +479,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_types.h
%{
#include "svn_types.h"
#include "svn_time.h"
@@ -496,3 +495,4 @@
#include "swigutil_pl.h"
#endif
%}
+%include svn_types.h
Index: subversion/bindings/swig/svn_fs.i
===================================================================
--- subversion/bindings/swig/svn_fs.i (revision 12591)
+++ subversion/bindings/swig/svn_fs.i (working copy)
@@ -129,7 +129,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_fs.h
%{
#include "svn_md5.h"
#include "svn_fs.h"
@@ -146,3 +145,4 @@
#include "swigutil_pl.h"
#endif
%}
+%include svn_fs.h
Index: subversion/bindings/swig/svn_wc.i
===================================================================
--- subversion/bindings/swig/svn_wc.i (revision 12591)
+++ subversion/bindings/swig/svn_wc.i (working copy)
@@ -118,7 +118,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_wc.h
%{
#include "svn_wc.h"
@@ -134,3 +133,4 @@
#include "swigutil_pl.h"
#endif
%}
+%include svn_wc.h
Index: subversion/bindings/swig/svn_repos.i
===================================================================
--- subversion/bindings/swig/svn_repos.i (revision 12591)
+++ subversion/bindings/swig/svn_repos.i (working copy)
@@ -143,7 +143,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_repos.h
%{
#include "svn_repos.h"
@@ -159,3 +158,4 @@
#include "swigutil_pl.h"
#endif
%}
+%include svn_repos.h
Index: subversion/bindings/swig/svn_delta.i
===================================================================
--- subversion/bindings/swig/svn_delta.i (revision 12591)
+++ subversion/bindings/swig/svn_delta.i (working copy)
@@ -62,7 +62,6 @@
/* ----------------------------------------------------------------------- */
-%include svn_delta.h
%{
#include "svn_md5.h"
#include "svn_delta.h"
@@ -79,6 +78,7 @@
#include "swigutil_pl.h"
#endif
%}
+%include svn_delta.h
/* -----------------------------------------------------------------------
editor callback invokers
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jan 5 03:52:12 2005