Thanks for that. As a worka-around Rakudo seems to do a better job, if I
give it a helping hand viz a TWEAK method:
use NativeCall;
class Point is repr('CStruct') {
has uint8 $.x;
has uint8 $.y;
}
class MyStruct2 is repr('CStruct') {
HAS Point $.point; # <-- embedded
has int8 $.f
Thanks for that. As a worka-around Rakudo seems to do a better job, if I
give it a helping hand viz a TWEAK method:
use NativeCall;
class Point is repr('CStruct') {
has uint8 $.x;
has uint8 $.y;
}
class MyStruct2 is repr('CStruct') {
HAS Point $.point; # <-- embedded
has int8 $.f
On Wed, 04 Oct 2017 23:19:19 -0700, david.warring wrote:
> From
> https://docs.perl6.org/language/nativecall#Embedding_CStructs_and_CUnions
>
> class Point is repr('CStruct') {
> has uint16 $.x;
> has uint16 $.y;
> }
>
> class MyStruct2 is repr('CStruct') {
> HAS Point $.point; # <--
# New Ticket Created by David Warring
# Please include the string: [perl #13]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=13 >
From
https://docs.perl6.org/language/nativecall#Embedding_CStructs_and_CUnions
class Po