You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/11/16 19:59:39 UTC
svn commit: r1035745 - in /subversion/trunk/subversion/bindings/swig:
include/svn_containers.swg perl/native/t/3client.t
Author: hwright
Date: Tue Nov 16 18:59:39 2010
New Revision: 1035745
URL: http://svn.apache.org/viewvc?rev=1035745&view=rev
Log:
Add support to the Perl bindings for the apr_array_header_t** providers type.
This fixes svn_auth_get_platform_specific_client_providers() in the Perl
bindings. Test case included.
[ Note: This *looks* good, and all the tests pass, but I know so little Perl
as to make my own review almost useless. ]
Patch by: Matthijs Kooijman <ma...@stdin.nl>
* subversion/bindings/swig/include/svn_containers.swg:
Add typemap for apr_array_header_t **providers.
* subversion/bindings/swig/perl/native/t/3client.t:
Add the new test, and run it.
Modified:
subversion/trunk/subversion/bindings/swig/include/svn_containers.swg
subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
Modified: subversion/trunk/subversion/bindings/swig/include/svn_containers.swg
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/include/svn_containers.swg?rev=1035745&r1=1035744&r2=1035745&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/include/svn_containers.swg (original)
+++ subversion/trunk/subversion/bindings/swig/include/svn_containers.swg Tue Nov 16 18:59:39 2010
@@ -863,3 +863,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
Modified: subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t?rev=1035745&r1=1035744&r2=1035745&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t Tue Nov 16 18:59:39 2010
@@ -20,7 +20,7 @@
#
#
-use Test::More tests => 118;
+use Test::More tests => 119;
use strict;
# shut up about variables that are only used once.
@@ -464,6 +464,19 @@ SKIP: {
'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);