-
-
Save jnthn/0a4ca61523d3fb4aa9b5 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 b82be7b..bd4812e 100644 | |
--- a/lib/NativeCall.pm6 | |
+++ b/lib/NativeCall.pm6 | |
@@ -339,9 +339,9 @@ role ExplicitlyManagedString { | |
has $.cstr is rw; | |
} | |
-multi explicitly-manage(Str $x, :$encoding = 'utf8') is export(:DEFAULT, | |
+multi explicitly-manage(Str $x is rw, :$encoding = 'utf8') is export(:DEFAULT, | |
:utils) { | |
- $x does ExplicitlyManagedString; | |
+ $x = $x but ExplicitlyManagedString; | |
my $class = class CStr is repr('CStr') { method encoding() { $encoding; } }; | |
$x.cstr = nqp::box_s(nqp::unbox_s($x), nqp::decont($class)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment