Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing encoded trait for Str attributes (CStruct, NativeCall) #5038

Open
p6rt opened this issue Jan 11, 2016 · 4 comments
Open

missing encoded trait for Str attributes (CStruct, NativeCall) #5038

p6rt opened this issue Jan 11, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jan 11, 2016

Migrated from rt.perl.org#127237 (status was 'open')

Searchable as RT127237$

@p6rt
Copy link
Author

p6rt commented Jan 11, 2016

From drako@drako.guru

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.

@p6rt
Copy link
Author

p6rt commented Jan 11, 2016

From @Skarsnik

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.

@p6rt
Copy link
Author

p6rt commented Jan 11, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 11, 2016

From drako@drako.guru

Am Mo 11. Jan 2016, 06​:18​:41, scolinet@​gmail.com schrieb​:

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.

@p6rt p6rt added the NativeCall label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant