Created
April 17, 2017 10:59
-
-
Save niner/7bcd6145c3209d91c211c2f2e453f5db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/NativeCall.pm6 b/lib/NativeCall.pm6 | |
index 8a5a17331..b094b0164 100644 | |
--- a/lib/NativeCall.pm6 | |
+++ b/lib/NativeCall.pm6 | |
@@ -214,6 +214,9 @@ sub guess_library_name($lib) is export(:TEST) { | |
$libname = $lib[0]; | |
$apiversion = $lib[1]; | |
} | |
+ when IO::Path { | |
+ $libname = $lib.Str; | |
+ } | |
when Str { | |
$libname = $lib; | |
} | |
@@ -284,7 +287,7 @@ my Lock $setup-lock .= new; | |
# This role is mixed in to any routine that is marked as being a | |
# native call. | |
-my role Native[Routine $r, $libname where Str|Callable|List] { | |
+my role Native[Routine $r, $libname where Str|Callable|List|IO::Path] { | |
has int $!setup; | |
has native_callsite $!call is box_target; | |
has Mu $!rettype; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment