<p></p>
<p><b>@benpicco</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16887#discussion_r715602605">tests/pkg_elk/main.c</a>:</p>
<pre style='color:#555'>> + * @author      Alexandre Abadie <alexandre.abadie@inria.fr>
+ *
+ * @}
+ */
+#include <stdio.h>
+#include "elk.h"
+
+/* C function that adds two numbers. Will be called from JS */
+int sum(int a, int b) {
+  return a + b;
+}
+
+int main(void) {
+  char mem[256];
+  struct js *js = js_create(mem, sizeof(mem));  /* Create JS instance */
+  jsval_t v = js_import(js, sum, "iii");        /* Import C function "sum" */
</pre>
<p>"iii" is for "takes two integers, returns an integer?"</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16887#pullrequestreview-763065061">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDYVR6MNCIDJXPSQ3LUDR2WNANCNFSM5EVW6GWQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABE7WYE25CRHYKKW3S4BYETUDR2WNA5CNFSM5EVW6GW2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFV5XFZI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16887#pullrequestreview-763065061",
"url": "https://github.com/RIOT-OS/RIOT/pull/16887#pullrequestreview-763065061",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>