{"action":"opened","issue":{"url":"https://api.github.com/repos/vickenty/perl-xs/issues/14","repository_url":"https://api.github.com/repos/vickenty/perl-xs","labels_url":"https://api.github.com/repos/vickenty/perl-xs/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/vickenty/perl-xs/issues/14/comments","events_url":"https://api.github.com/repos/vickenty/perl-xs/issues/14/events","html_url":"https://github.com/vickenty/perl-xs/issues/14","id":186172462,"number":14,"title":"Calling Perl from Rust","user":{"login":"vickenty","id":914873,"avatar_url":"https://avatars.githubusercontent.com/u/914873?v=3","gravatar_id":"","url":"https://api.github.com/users/vickenty","html_url":"https://github.com/vickenty","followers_url":"https://api.github.com/users/vickenty/followers","following_url":"https://api.github.com/users/vickenty/following{/other_user}","gists_url":"https://api.github.com/users/vickenty/gists{/gist_id}","starred_url":"https://api.github.com/users/vickenty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vickenty/subscriptions","organizations_url":"https://api.github.com/users/vickenty/orgs","repos_url":"https://api.github.com/users/vickenty/repos","events_url":"https://api.github.com/users/vickenty/events{/privacy}","received_events_url":"https://api.github.com/users/vickenty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-30T23:12:33Z","updated_at":"2016-10-30T23:12:33Z","closed_at":null,"body":"There are four functions to call into Perl in XS, of which only one is currently supported.\r\n\r\n- [ ] `I32 call_sv(SV* sv, I32 flags);`\r\n- [x] `I32 call_pv(char *subname, I32 flags);`\r\n- [ ] `I32 call_method(char *methname, I32 flags);` \r\n- [ ] `I32 call_argv(char *subname, I32 flags, char **argv);`\r\n\r\nWhat would be the best way to represent different combinations of flags? Some of them are mutually exclusive, others depend on other flags.\r\n\r\nA further improvement can be a macro that hides different ways to call a sub, and handles argument passing, something like:\r\n```rust\r\ncall!(ctx, sub_sv, a, b, c);\r\ncall!(ctx, \"Foo::name\", a, b, c);\r\ncall!(ctx, sv->\"name\", a, b, c);\r\ncall!(ctx, sv->method_sv, a, b, c);\r\n```\r\n"}}
{"actor":{"display_login":"vickenty"}}