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

Feature Request NativeCall function pointer typedef #6294

Open
p6rt opened this issue May 30, 2017 · 1 comment
Open

Feature Request NativeCall function pointer typedef #6294

p6rt opened this issue May 30, 2017 · 1 comment

Comments

@p6rt
Copy link

p6rt commented May 30, 2017

Migrated from rt.perl.org#131401 (status was 'new')

Searchable as RT131401$

@p6rt
Copy link
Author

p6rt commented May 30, 2017

From @BenGoldberg1

In C, it’s possible to use typedefs for all sorts of things, including​:

  typedef int (*callback_t)( struct node_t * n, void *user_data );
  void walk_tree( struct tree_t *t, callback_t c, void * user_data );

It would be nice if there existed some way define, in perl6, an equivalent of callback_t which
would work with NativeCall. At present, the subsignatures of a callback must be fully written out,
and that can get very tedious if there are several functions which take the same type of callback.

I’m not sure of the best way to do this, honestly.

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

1 participant