On Wed, Sep 8, 2010 at 1:09 PM, Matthijs Kooijman <matth...@stdin.nl> wrote:
> Hi folks,
>
>> While writing this, I've finally found the "include/svn_containers.swg"
>> file containing all kinds of typemaps for the apr_*_t types. I'll try
>> poking in there a bit, I'll keep you posted.
>
> Using the following patch (which just appends a bit to the end of the file),
> the svn_auth_get_platform_specific_client_providers becomes available in the
> perl bindings (and with a small change to git-svn, I can use gnome-keyring 
> from
> git-svn now :-D).
>
> I've copied this code from the typemaps for svn_client_proplist_item_t in
> svn_client.i, but those seem to contain specific conversion code for Ruby and
> Python, while the actual pointer type is just preserved in Perl. I'm not
> completly sure how this would work for Python and Ruby, perhaps someone else
> can help me out here?
>
> Would you considering committing this patch (after completion) to the main
> repository?

I've very little knowledge about the underlying magic of swig, but
here are a few general thoughts.

Would it be possible to add a test to the Perl bindings tests which
exercises this new code?

Additionally, you should probably provide a log message in the
standard format [1].

-Hyrum

[1] 
http://subversion.apache.org/docs/community-guide/conventions.html#log-messages

>
> Gr.
>
> Matthijs
>
> Index: 
> subversion-1.6.12dfsg/subversion/bindings/swig/include/svn_containers.swg
> ===================================================================
> --- 
> subversion-1.6.12dfsg.orig/subversion/bindings/swig/include/svn_containers.swg
>       2010-09-08 20:00:18.000000000 +0200
> +++ subversion-1.6.12dfsg/subversion/bindings/swig/include/svn_containers.swg 
>   2010-09-08 20:00:22.000000000 +0200
> @@ -808,3 +808,13 @@
>  %typemap(argout) apr_array_header_t **RANGELIST_INOUT =
>    apr_array_header_t **RANGELIST;
>  #endif
> +
> +/* -----------------------------------------------------------------------
> +   Output of apr_array_header_t * <svn_auth_provider_object_t *>
> +*/
> +#ifdef SWIGPERL
> +%typemap(argout) apr_array_header_t **providers {
> +  %append_output(svn_swig_pl_convert_array(*$1,
> +                    $descriptor(svn_auth_provider_object_t *)));
> +}
> +#endif
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkyH0VQACgkQz0nQ5oovr7ziZgCfRvBmOLl8cbCutOxTPptXyiIq
> Q3UAn2aNu/l3/LtJN9KBGNAAHlfX4i/3
> =pJZI
> -----END PGP SIGNATURE-----
>
>

Reply via email to