Skip to content
Permalink
Browse files

Move some constant return values to signature

  • Loading branch information...
lizmat committed Jan 11, 2019
1 parent 50e1ec3 commit 3eeb72762c67cc70b34bf7f778f6c052c99ad232
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/NativeCall.pm6
@@ -643,7 +643,7 @@ multi explicitly-manage(Str $x, :$encoding = 'utf8') is export(:DEFAULT,
}

role CPPConst {
method cpp-const() { 1 }
method cpp-const(--> 1) { }
}
multi trait_mod:<is>(Routine $p, :$cpp-const!) is export(:DEFAULT, :traits) {
$p does CPPConst;
@@ -653,15 +653,14 @@ multi trait_mod:<is>(Parameter $p, :$cpp-const!) is export(:DEFAULT, :traits) {
}

role CPPRef {
method cpp-ref() { 1 }
method cpp-ref(--> 1) { }
}
multi trait_mod:<is>(Parameter $p, :$cpp-ref!) is export(:DEFAULT, :traits) {
$p does CPPRef;
}

multi refresh($obj) is export(:DEFAULT, :utils) {
multi refresh($obj --> 1) is export(:DEFAULT, :utils) {
nqp::nativecallrefresh($obj);
1;
}

multi sub nativecast(Signature $target-type, $source) is export(:DEFAULT) {

0 comments on commit 3eeb727

Please sign in to comment.
You can’t perform that action at this time.