Skip to content

Commit 11a0662

Browse files
committed
Some reflow and minor fixes
1 parent d7dfc2b commit 11a0662

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

doc/Language/nativetypes.pod6

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ more information on them.
1212
X<|int>X<|uint>X<|num>X<|str>
1313
=head1 Types with native representation
1414
15-
Some simple types in Perl 6 have a I<native> representation, indicating that they will use the C language representation provided by the compiler, operating system and machine. These are the four native types available:
15+
Some simple types in Perl 6 have a I<native> representation, indicating that
16+
they will use the C language representation provided by the compiler, operating
17+
system and machine. These are the four native types available:
1618
1719
=begin table
1820
int Equivalent to Int
@@ -22,9 +24,9 @@ Some simple types in Perl 6 have a I<native> representation, indicating that th
2224
=end table
2325
2426
However, these types do not necessarily have the size that is required by the
25-
L<NativeCall|/language/nativecall> interface (e.g., Perl 6's C<int> can be 8 bytes
26-
but C's C<int> is only 4 bytes). Instead, the types below will have to be used
27-
instead of the types C<int> or C<num> listed above.
27+
L<NativeCall|/language/nativecall> interface (e.g., Perl 6's C<int> can be 8
28+
bytes but C's C<int> is only 4 bytes). Instead, the types below will have to be
29+
used instead of the types C<int> or C<num> listed above.
2830
2931
In general, these variables will behave in the same way as regular scalar
3032
variables, in a behavior that is called
@@ -53,7 +55,8 @@ X<|int8>X<|int16>X<|int32>X<|int64>X<|uint8>X<|uint16>X<|uint32>X<|uint64>X<|num
5355
What has been mentioned about types with native representation also applies
5456
here; they will be auto-boxed to Perl 6 types and will not be boundable.
5557
However, these types, which are listed in the table below, have the
56-
characteristic of being usable in L<NativeCall|/language/nativecall#Passing_and_Returning_Values> functions.
58+
characteristic of being usable in
59+
L<NativeCall|/language/nativecall#Passing_and_Returning_Values> functions.
5760
5861
=begin table
5962
int8 (int8_t in C, also used for char)
@@ -124,7 +127,7 @@ pointers to void cannot be dereferenced:
124127
=begin code :skip-test<unhandled type error>
125128
use NativeCall;
126129
my Pointer[void] $native = nativecast(Pointer[void], Buf.new(0x22, 0x33));
127-
say $native.deref; ERROR OUTPUT: «Internal error: unhandled target type␤»
130+
say $native.deref; # ERROR OUTPUT: «Internal error: unhandled target type␤»
128131
=end code
129132
130133

0 commit comments

Comments
 (0)