Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #795 from nsvedberg/nativecall-typo-fix
Change 'mayor' to 'major' in my_version pointers example
  • Loading branch information
AlexDaniel committed Aug 4, 2016
2 parents b876885 + a92017a commit 6d12e31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/Language/nativecall.pod6
Expand Up @@ -121,9 +121,9 @@ call, the argument must be manually encoded and passed as C<CArray[uint8]>:
When the signature of your native function needs a pointer to some native type
(C<int32>, C<uint32>, etc.) all you need to do is declare the argument C<is rw> :
# C prototype is void my_version(int *mayor, int *minor)
# C prototype is void my_version(int *major, int *minor)
sub my_version(int32 is rw, int32 is rw) is native('foo') { * }
my_version(my int32 $mayor, my int32 $minor); # Pass a pointer to
my_version(my int32 $major, my int32 $minor); # Pass a pointer to
Sometimes you need to get a pointer (for example, a library handle) back from a
C library. You don't care about what it points to - you just need to keep hold
Expand Down

0 comments on commit 6d12e31

Please sign in to comment.