Skip Menu |
Report information
Id: 127237
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: drako [at] drako.guru
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: missing encoded trait for Str attributes (CStruct, NativeCall)
Download (untitled) / with headers
text/plain 278b
The following should apply the same marshalling as passing a Str to a native function. Example: use NativeCall; class Foo is repr('CStruct') { has Str $.bar is encoded('utf16'); }; Error: Can't use unknown trait 'is encoded' in an attribute declaration.
Download (untitled) / with headers
text/plain 469b
Le Lun 11 Jan 2016 06:05:49, drako@drako.guru a écrit : Show quoted text
> The following should apply the same marshalling as passing a Str to a > native function. > > Example: > > use NativeCall; > > class Foo is repr('CStruct') { > has Str $.bar is encoded('utf16'); > }; > > Error: > Can't use unknown trait 'is encoded' in an attribute declaration.
I am not sure we want to keep the 'encoded' name for Attribute, since it's just the encoding destined for the Native lib.
Download (untitled) / with headers
text/plain 651b
Am Mo 11. Jan 2016, 06:18:41, scolinet@gmail.com schrieb: Show quoted text
> Le Lun 11 Jan 2016 06:05:49, drako@drako.guru a écrit :
> > The following should apply the same marshalling as passing a Str to a > > native function. > > > > Example: > > > > use NativeCall; > > > > class Foo is repr('CStruct') { > > has Str $.bar is encoded('utf16'); > > }; > > > > Error: > > Can't use unknown trait 'is encoded' in an attribute declaration.
> > I am not sure we want to keep the 'encoded' name for Attribute, since > it's just the encoding destined for the Native lib.
sure, but that change should also be consistent accross CStruct, CUnion and function calls.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org