Hi,
In <df2177af0510142107t436fecc8u8dbbd1fd24d58832@mail.gmail.com>
"Re: svn commit: r16722 - trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby" on Sat, 15 Oct 2005 00:07:15 -0400,
David James <james82@gmail.com> wrote:
> > Duplicate an object passed to callback for avoiding segmentation fault.
> 1. The following definitions still use c2r_swig_type, and therefore do
> not duplicate their provided objects. Can we fix these?
>
> DEFINE_APR_ARRAY_TO_ARRAY(static VALUE, c2r_commit_item_array,
> c2r_swig_type, &, svn_client_commit_item_t,
> (void *)"svn_client_commit_item_t *")
> DEFINE_APR_ARRAY_TO_ARRAY(VALUE, svn_swig_rb_apr_array_to_array_prop,
> c2r_swig_type, &, svn_prop_t,
> (void *)"svn_prop_t *")
> DEFINE_APR_ARRAY_TO_ARRAY(VALUE, svn_swig_rb_apr_array_to_array_proplist_item,
> c2r_swig_type, , svn_client_proplist_item_t *,
> (void *)"svn_client_proplist_item_t *")
> DEFINE_APR_ARRAY_TO_ARRAY(VALUE, svn_swig_rb_apr_array_to_array_external_item,
> c2r_swig_type, , svn_wc_external_item_t *,
> (void *)"svn_wc_external_item_t *")
I changed to use c2r_prop_dup() for svn_prop_t. But other
cases are not changed. Because there are not duplicate
functions for svn_client_commit_item_t,
svn_client_proplist_item_t and svn_wc_external_item_t.
> 2. The following functions use svn_swig_apr_hash_to_hash_swig_type,
> which does not duplicate provided objects. Can we fix this?
> svn_swig_rb_repos_file_rev_handler
> svn_swig_rb_ra_file_rev_handler
The conversion is a bug caused by my misconception. I
believed rev_props is a hash of svn_prop_t but this is a
hash of svn_string_t.
> 3. Can we prefix the new "dup" functions with "c2r", to clarify that
> they convert C->Ruby, and make "dup" a suffix instead of a prefix?
> E.g. Instead of dup_lock, call the function c2r_lock_dup.
I agree. This is a good idea.
Regards,
--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 15 12:57:56 2005