You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Evan Phoenix <ev...@fallingsnow.net> on 2006/04/11 06:56:11 UTC

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

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


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

Posted by Michael W Thelen <mi...@pietdepsi.com>.
David James wrote:
>>If no one responds to your patch within a few days, I'll go ahead and
>>file an issue for it in the issue tracker.
> 
> Evan later split this patch up into 3 simpler other patches and submit
> them instead. These other patches have already been accepted into
> Subversion. So there is no need to review this patch.

Oh, sorry about that!  And thanks for pointing that out.  I had briefly
checked the code and didn't see the changes applied, and my mail server
has been wonky for the past several days, so I didn't see Evan's later
mails.  Whoops, back to the mail archive I go... :-)

-- 
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes.       -- Douglas Adams

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by David James <dj...@collab.net>.
On 4/17/06, Michael W Thelen <mi...@pietdepsi.com> wrote:
> Evan Phoenix wrote:
> >>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.
>
> Thank you for the patch... would you mind resending it with a MIME type
> other than application/octet-stream?  It would probably be more likely
> to be seen if it were text/plain or something similar.  Thanks!
>
> If no one responds to your patch within a few days, I'll go ahead and
> file an issue for it in the issue tracker.

Evan later split this patch up into 3 simpler other patches and submit
them instead. These other patches have already been accepted into
Subversion. So there is no need to review this patch.

Cheers,

David


--
David James -- http://www.cs.toronto.edu/~james

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


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

Posted by Michael W Thelen <mi...@pietdepsi.com>.
Evan Phoenix wrote:
>>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.

Thank you for the patch... would you mind resending it with a MIME type
other than application/octet-stream?  It would probably be more likely
to be seen if it were text/plain or something similar.  Thanks!

If no one responds to your patch within a few days, I'll go ahead and
file an issue for it in the issue tracker.

-- 
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes.       -- Douglas Adams

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Evan Phoenix <ev...@fallingsnow.net>.
Ack! Forgot the patch!

On 4/10/06, Evan Phoenix <ev...@fallingsnow.net> wrote:
> 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)
>


--
When I do good, I feel good;  when I do bad, I feel bad,
and that is my religion.
    -- Abraham Lincoln (1809 - 1865)