Permalink
Browse files

adapt to updated trait calling conventions

  • Loading branch information...
1 parent 2a2c373 commit d419ffa4ce4f6b6edb19afff02a5f7b8728e5abe @moritz moritz committed May 12, 2012
Showing with 2 additions and 8 deletions.
  1. +2 −8 lib/NativeCall.pm6
View
10 lib/NativeCall.pm6
@@ -205,16 +205,10 @@ my class CArray is export is repr('CArray') {
}
}
-# Specifies that the routine is actually a native call, and gives
-# the name of the library to load it from.
-multi trait_mod:<is>(Routine $r, $libname, :$native!) is export {
- $r does Native[$r, $libname];
-}
-
# Specifies that the routine is actually a native call, into the
-# current executable (platform specific).
+# current executable (platform specific) or into a named library
multi trait_mod:<is>(Routine $r, :$native!) is export {
- $r does Native[$r, Str];
+ $r does Native[$r, $native === True ?? Str !! $native];
}
# Specifies the calling convention to use for a native call.

0 comments on commit d419ffa

Please sign in to comment.