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

Possibility to specify FFI::Platypus custom type #6

Open
pablrod opened this issue Jun 8, 2017 · 3 comments
Open

Possibility to specify FFI::Platypus custom type #6

pablrod opened this issue Jun 8, 2017 · 3 comments

Comments

@pablrod
Copy link

pablrod commented Jun 8, 2017

NativeCall works very well with FFI::Platypus types, but sometimes is useful to attach custom types. For example: StringArray, StringPointer or char ***.

@mohawk2
Copy link
Owner

mohawk2 commented Jun 19, 2017

@plicease Thoughts? :-)

@mohawk2 mohawk2 changed the title Posibility to specify FFI::Platypus custom type Possibility to specify FFI::Platypus custom type Jun 19, 2017
@plicease
Copy link
Contributor

It would be nice I am not exactly sure what the interface should be.

@pablrod
Copy link
Author

pablrod commented Jun 20, 2017

My proposal is enabling two interfaces:

  1. Global: function register_type in NativeCall.pm (global means subclass level, maybe using a my %custom_types where the key is caller's __PACKAGE__)

  2. Per function declaration:
    Add an attribute called CustomTypes that tries to attach every type name passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants