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

Re: svn commit: rev 4766 - trunk/subversion/bindings/swig

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2003-02-06 19:25:25 CET

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> dlr@tigris.org writes:
> > +static svn_error_t * thunk_apply_text(void *file_baton,
> > + const char *base_checksum,
> > + const char *result_checksum,
> > + svn_stream_t *base,
> > + svn_stream_t *target,
> > + const struct svn_delta_editor_t *editor,
> > + apr_pool_t *pool)
> > +{
> > + /* TODO */
> > + return SVN_NO_ERROR;
> > +}
> > +
> > static svn_error_t * thunk_change_file_prop(void *file_baton,
> > const char *name,
> > const svn_string_t *value,
> > @@ -644,6 +658,7 @@
> > thunk_add_file,
> > thunk_open_file,
> > thunk_apply_textdelta,
> > + thunk_apply_text,
> > thunk_change_file_prop,
> > thunk_close_file,
> > thunk_close_edit,
>
> Most editors ar inheriting a specific implementation of apply_text()
> from the editor created by svn_delta_default_editor(). That
> apply_text invokes the editor's apply_textdelta() function. This is
> what is allowing us to convert editor drivers first, then convert the
> editors themselves (i.e., give them their own implementations of
> apply_text).
>
> Is there any way to do that here? (Or is there some reaason why it's
> not an issue?)

Only 'cuz I didn't know any better. The Python SWIG bindings are
doing just that -- using the svn_delta_editor_t returned by
svn_delta_default_editor() as the "base class" and overriding all
functions except apply_text(). Simply cutting and pasting from
swigutil_py.c editor factory function corrected things.

There does seem to be some amount of duplication between the swigutil
lib for Python and Java (no suprise since I just copied the Python
version to get the Java version started). I suppose we'll eventually
want to factor out the commonalities, but I personally have a bit of a
mental block when working on this code with so many different layers
and technologies floating around.

-- 
Daniel Rall <dlr@finemaltcoding.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 6 19:26:35 2003

This is an archived mail posted to the Subversion Dev mailing list.