From: Nicholas Clark Date: Fri, 28 Aug 2009 21:16:31 +0000 (+0100) Subject: Use & function-call notation to disable prototype checking on dl_load_file() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2c4b2d6db383103b96e4733616b17d0a3bb0bd9;p=p5sagit%2Fp5-mst-13.2.git Use & function-call notation to disable prototype checking on dl_load_file() This causes the test for insufficient arguments to work on Win32 too, where (for some reason) DynaLoader.xs is built *with* prototypes on the XS code. On *nix, where it is build by MakeMaker in ext/DynaLoader/, it is built without prototypes on the XS code, so the check on the number of parameters for dl_load_file() is purely run-time, which is what the test script used to assume. --- diff --git a/ext/DynaLoader/t/DynaLoader.t b/ext/DynaLoader/t/DynaLoader.t index 28d91e0..2cff37a 100644 --- a/ext/DynaLoader/t/DynaLoader.t +++ b/ext/DynaLoader/t/DynaLoader.t @@ -87,7 +87,7 @@ if ($Config{usedl}) { # .. for dl_load_file() SKIP: { skip "no dl_load_file with dl_none.xs", 2 unless $Config{usedl}; - eval { DynaLoader::dl_load_file() }; + eval { &DynaLoader::dl_load_file() }; like( $@, q{/^Usage: DynaLoader::dl_load_file\(filename, flags=0\)/}, "calling DynaLoader::dl_load_file() with no argument" );