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

[PATCH] ruby bindings: better baton handling and typo fixes

From: Evan Phoenix <evan_at_fallingsnow.net>
Date: 2006-04-11 08:56:11 CEST

Here is a patch that I've compiled why working with the ruby bindings.

[[[
Track batons better so that they don't get lost when the garbage collector runs.
Also, fixes a couple of typo-style bugs and adds some missing swig typemaps.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (rb_pool_new) initialize the array to store batons that are in use.
  (svn_swig_rb_make_baton) save ever baton created into the current pool so
        there is always at least one reference to it.
  (svn_swig_rb_from_baton) check that a baton is still valid before
trying to use it.
        This protects against nasty segfaults, opting instead for an exception.
  (ra_callbacks_get_wc_prop) properly support returning NULL
  (ra_callbacks_push_wc_prop) 5 elements, not 4. and typo, should have been
         value as the last arg, not name.

* subversion/bindings/swig/ruby/svn/delta.rb
  (change_dir_prop) typo, pass through the passed in dir_baton
  (close_edit) takes a baton as well.

* subversion/bindings/swig/ruby/svn/ra.rb
  (set_path) Ra, not Rs
  (delete_path) Ra, not Rs

* subversion/bindings/swig/ruby/svn_delta.c
* subversion/bindings/swig/ruby/svn_ra.c
  SWIG autogenerated changes.

* subversion/bindings/swig/svn_delta.i
  (const char *MAY_BE_NULL) text_checksum can optionally be NULL

* subversion/bindings/swig/svn_ra.i
  Added typemaps for delta_editors with edit_baton, update_baton, and
  diff_baton arguments. This allows any object to serve as editors in these
  places. Code is actually duplicated from the same file, all that was done is
  altering the name of the baton.
]]]

--
When I do good, I feel good;  when I do bad, I feel bad,
and that is my religion.
    -- Abraham Lincoln (1809 - 1865)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 11 18:58:04 2006

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.