mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 00:13:43 +00:00
loader/cgo: add support for function pointers
This commit is contained in:
Vendored
+4
@@ -10,6 +10,10 @@ int add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
int doCallback(int a, int b, binop_t callback) {
|
||||
return callback(a, b);
|
||||
}
|
||||
|
||||
void store(int value, int *ptr) {
|
||||
*ptr = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user