[jira] [Created] (SVN-4805) swig ruby bindings: delta path editor binding broken for root path

"Julian Foad (JIRA)" <[email protected]>
Newsgroups gmane.comp.version-control.subversion.issues
Message-ID <[email protected]>
Julian Foad created SVN-4805:
--------------------------------

             Summary: swig ruby bindings: delta path editor binding broken for root path
                 Key: SVN-4805
                 URL: https://issues.apache.org/jira/browse/SVN-4805
             Project: Subversion
          Issue Type: Bug
          Components: bindings_swig_ruby
            Reporter: Julian Foad


The Ruby binding for delta path-driver is broken.

r1852536 fixed a bug in handling of slash-prefixed paths, whereby a "/" path was handled as a regular path not as a root path. That exposed the bug in the bindings for the path-driver: it assumes the callback always gets a non-null "parent_dir_baton", but that's not so for the root path.

The relevant function is 'svn_swig_rb_delta_path_driver_cb_func' which dereferences 'ib' (the parent_baton argument), but the problem extends to the whole delta-editor bindings because this function tries to return a dir-baton that includes 'ib->editor', and if it can't do that, it looks like the other editor methods won't be able to work.

Fixing it looks too difficult for me.

In principle, it's Just a matter of passing the required info through the "callback_baton" argument instead, but that's currently coded as a standard type shared by many callback types.

Better... The new svn_delta_path_driver3() passes the 'editor' and 'edit_baton' directly to the svn_delta_path_driver_cb_func2_t callback type. The 'edit_baton' of the existing Ruby binding of the delta-editor contains the required information, it appears.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.