File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -649,11 +649,11 @@ say $esponja;
649
649
NativeCall also supports native functions that take functions as arguments. One
650
650
example of this is using function pointers as callbacks in an event-driven
651
651
system. When binding these functions via NativeCall, one need only provide the
652
- equivalent signature as a constraint on the code parameter:
652
+ equivalent signature as L < a constraint on the code parameter|/type/Signature.html#Constraining_signatures_of_Callables > :
653
653
654
654
use NativeCall;
655
655
# void SetCallback(int (*callback)(const char *))
656
- my sub SetCallback(&callback (Str --> int32)) is native('mylib') { * }
656
+ my sub SetCallback(&callback: (Str --> int32)) is native('mylib') { * }
657
657
658
658
Note: the native code is responsible for memory management of values passed to
659
659
Perl 6 callbacks this way. In other words, NativeCall will not free() strings passed
You can’t perform that action at this time.
0 commit comments