Skip to content

Commit

Permalink
Fix test using invalid types for NativeCall
Browse files Browse the repository at this point in the history
Pointer to Int doesn't make sense in NativeCall, since Int is no C type.
Use Pointer[int32] instead as that will translate to int* in C.
  • Loading branch information
niner committed Dec 30, 2015
1 parent 3dc7d55 commit adb1608
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/04-nativecall/04-pointers.t
Expand Up @@ -27,14 +27,14 @@ is +Pointer.new($a), $a, 'Pointer.new accepts a native int too';
ok ReturnNullPointer() === Pointer, 'A returned NULL pointer is the Pointer type object itself';

{
eval-lives-ok q:to 'CODE', 'Signature matching with Pointer[Int] works (RT #124321)';
eval-lives-ok q:to 'CODE', 'Signature matching with Pointer[int32] works (RT #124321)';
use NativeCall;
sub TakeTwoPointersToInt( Pointer[Int], Pointer[Int] )
sub TakeTwoPointersToInt( Pointer[int32], Pointer[int32] )
is native( './04-pointers' ) { * }
my Pointer[Int] $r;
my Pointer[Int] $c;
my Pointer[int32] $r;
my Pointer[int32] $c;
TakeTwoPointersToInt( $r, $c );
CODE
Expand Down

0 comments on commit adb1608

Please sign in to comment.