Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
Nicholas good UGT, * 05:47
lizmat Nicholas o/ 06:20
Nicholas \o
[Coke] waves good day from behind his k-cup of quick caffeine 11:20
Xliff m: use NativeCall; my \mallocParams = :(size_t --> Pointer); mallocParams.say; sub a (&c:(|mallocParams), Int() $s) { my size_t $ss = $s; &c($ss).say; }; sub malloc (size_t --> Pointer) is native {*}; malloc(20).say; a(&malloc, 20); 11:55
camelia (NativeCall::Types::size_t --> NativeCall::Types::Pointer)
Cannot resolve caller protect(Lock:U: Block:D); none of these signatures matches:
(Lock:D: &code, *%_)
in method setup at /home/camelia/rakudo-m-inst-2/share/perl6/core/sources/871…
Xliff Hmmm... I get "Signature constraint check failed in binding to parameter '&c'; expected :(|mallocParams) but got :(NativeCall::Types:..."
That almost looks like a way to attach function pointers to a symbol, which I desperately need. What kind of changes would it take to make it work?
(...originally asked on #raku-dev)