This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix compilation errors in DynaLoader.c with MinGW/gcc -xc++
authorSteve Hay <steve.m.hay@googlemail.com>
Sat, 20 Dec 2014 13:08:37 +0000 (13:08 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 24 Dec 2014 13:20:07 +0000 (13:20 +0000)
error: invalid conversion from 'void*' to 'HMODULE'

ext/DynaLoader/DynaLoader_pm.PL
ext/DynaLoader/dl_win32.xs

index f2c082e..c9800b7 100644 (file)
@@ -85,7 +85,7 @@ package DynaLoader;
 # Tim.Bunce@ig.co.uk, August 1994
 
 BEGIN {
-    $VERSION = '1.29';
+    $VERSION = '1.30';
 }
 
 use Config;
index 178ca7c..d99f116 100644 (file)
@@ -148,7 +148,7 @@ dl_unload_file(libref)
     void *     libref
   CODE:
     DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_unload_file(%lx):\n", PTR2ul(libref)));
-    RETVAL = FreeLibrary(libref);
+    RETVAL = FreeLibrary((HMODULE)libref);
     if (!RETVAL)
         SaveError(aTHX_ "unload_file:%s", OS_Error_String(aTHX)) ;
     DLDEBUG(2,PerlIO_printf(Perl_debug_log, " retval = %d\n", RETVAL));