Skip to content

Commit

Permalink
nativecall: remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rudis committed Feb 22, 2016
1 parent 531e97f commit 109febd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions doc/Language/nativecall.pod
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function returns using C<explicitly-manage> :
my $string = "FOO";
explicitly-manage($string);
set_foo($string);
=head1 Basic use of Pointers
When the signature of your native function needs a pointer to some native type
Expand All @@ -111,7 +111,7 @@ When the signature of your native function needs a pointer to some native type
# C prototype is void my_version(int *mayor, 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
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
of it. The Pointer type provides for this.
Expand Down Expand Up @@ -232,12 +232,12 @@ CStruct reprs). Other than that, you can do the usual set of things you would wi
a class; you could even have some of the attributes come from roles or have them
inherited from another class. Of course, methods are completely fine too. Go wild!
CStruct objects are passed to native functions by reference and native functions
must also return CStruct objects by reference. The memory management
rules for these references are very much like the rules for arrays, though simpler
since a struct is never resized. When you create a struct, the memory is managed for
you and when the variable(s) pointing to the instance of a CStruct go away, the memory
will be freed when the GC gets to it. When a CStruct-based type is used as the return
CStruct objects are passed to native functions by reference and native functions
must also return CStruct objects by reference. The memory management
rules for these references are very much like the rules for arrays, though simpler
since a struct is never resized. When you create a struct, the memory is managed for
you and when the variable(s) pointing to the instance of a CStruct go away, the memory
will be freed when the GC gets to it. When a CStruct-based type is used as the return
type of a native function, the memory is not managed for you by the GC.
NativeCall currently doesn't put object members in containers, so assigning new values
Expand Down Expand Up @@ -299,8 +299,8 @@ You have to call C<.deref> on it to access the embeded type.
my Pointer[MyCstruct] $p2 = some_c_routine();
my MyCstruct $mc = $p2.deref;
say $mc.field1;
=head1 Buffers and Blobs
Expand Down Expand Up @@ -362,7 +362,7 @@ version or just a part of it (Try to stick to Major version, some BSD does not c
my List $lib = ('foo', 'v1');
sub foo is native($lib);
=head2 Routine
Expand Down

0 comments on commit 109febd

Please sign in to comment.