On 10/19/05, Daniel Rall <dlr@finemaltcoding.com> wrote:
> > +
> > +swig_init_asp_dot_net_hack($SVN::Core::gpool);
>
> This doesn't use the new "svn_wc_" prefix. Is that accurate?
Yup. The Perl bindings automagically remove the "svn_wc_" prefix. So,
it's the same to say "swig_init_asp_dot_net_hack", as it is to say
"svn_wc_swig_init_asp_dot_net_hack"
> ...
> > --- trunk/subversion/bindings/swig/ruby/svn/wc.rb (original)
> > +++ trunk/subversion/bindings/swig/ruby/svn/wc.rb Wed Oct 19 13:40:04 2005
> > @@ -9,6 +9,7 @@
> > module Wc
> > Util.set_constants(Ext::Wc, self)
> > Util.set_methods(Ext::Wc, self)
> > + self.swig_init_asp_dot_net_hack()
>
> Ditto.
Ditto for Ruby.
> ...
> > --- trunk/subversion/bindings/swig/svn_wc.i (original)
> > +++ trunk/subversion/bindings/swig/svn_wc.i Wed Oct 19 13:40:04 2005
> > @@ -299,7 +299,7 @@
> >
> > %inline %{
> > static svn_error_t *
> > -svn_swig_init_asp_dot_net_hack (apr_pool_t *pool)
> > +svn_wc_swig_init_asp_dot_net_hack (apr_pool_t *pool)
> > {
> > #if defined(WIN32) || defined(__CYGWIN__)
> > if (getenv ("SVN_ASP_DOT_NET_HACK"))
> > @@ -310,5 +310,5 @@
> > %}
> >
> > #if defined(SWIGPYTHON)
> > -%pythoncode %{ svn_swig_init_asp_dot_net_hack() %}
> > +%pythoncode %{ svn_wc_swig_init_asp_dot_net_hack() %}
> > #endif
>
> Looks like it does for Python, though?
The Python bindings also remove the "svn_wc_" prefix, but only for the
"svn.*" modules. So, if we moved this initialization code into
svn/wc.py, we'd be able to just say "swig_init_asp_dot_net_hack()".
IMHO, for the Python bindings, it's better to initialize the hack in
"svn_wc.i", in case the user wants to import libsvn.wc directly. So,
we need to use the "svn_wc_" prefix here.
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
Received on Wed Oct 19 23:03:17 2005