Hi folks, this is a resubmit of a patch that got lost in the list earlier.
The patch is a trivial patch, which adds perl bindings for the apr_array_header_t **providers type, which fixes the svn_auth_get_platform_specific_client_providers function. The patch also includes a basic test case. 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 Index: subversion-1.6.12dfsg/subversion/bindings/swig/perl/native/t/3client.t =================================================================== --- subversion-1.6.12dfsg.orig/subversion/bindings/swig/perl/native/t/3client.t 2010-09-10 21:21:03.000000000 +0200 +++ subversion-1.6.12dfsg/subversion/bindings/swig/perl/native/t/3client.t 2010-09-13 11:54:21.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Test::More tests => 118; +use Test::More tests => 119; use strict; # shut up about variables that are only used once. @@ -444,6 +444,19 @@ 'Successfully set auth_baton back to old value'); } +# Keep track of the ok-ness ourselves, since we need to know the exact +# number of tests at the start of this file. The 'subtest' feature of +# Test::More would be perfect for this, but it's only available in very +# recent perl versions, it seems. +my $ok = 1; +# Get a list of platform specific providers, using the default +# configuration and pool. +my @providers = @{SVN::Core::auth_get_platform_specific_client_providers(undef, undef)}; +foreach my $p (@providers) { + $ok &= defined($p) && $p->isa('_p_svn_auth_provider_object_t'); +} +ok($ok, 'svn_auth_get_platform_specific_client_providers returns _p_svn_auth_provider_object_t\'s'); + END { diag('cleanup'); rmtree($testpath);
signature.asc
Description: Digital signature