diff --git a/AUTHORS b/AUTHORS index 3759bf640f61b..860d6082ed914 100644 --- a/AUTHORS +++ b/AUTHORS @@ -213,4 +213,5 @@ a license to everyone to use it as detailed in LICENSE.) * Andrew Karpushin * Felix Zimmermann * Sven-Hendrik Haase +* Simon Sandström diff --git a/site/source/docs/api_reference/preamble.js.rst b/site/source/docs/api_reference/preamble.js.rst index fe1d58fd8a43a..62fb46f2f4b9d 100644 --- a/site/source/docs/api_reference/preamble.js.rst +++ b/site/source/docs/api_reference/preamble.js.rst @@ -100,7 +100,7 @@ Calling compiled C functions from JavaScript my_func(12) :param ident: The name of the C function to be called. - :param returnType: The return type of the function. This will be one of the JavaScript types ``number``, ``string`` or ``array`` (use ``number`` for any C pointer, and ``array`` for JavaScript arrays and typed arrays; note that arrays are 8-bit). + :param returnType: The return type of the function. This can be ``"number"``, ``"string"`` or ``"array"``, which correspond to the appropriate JavaScript types (use ``"number"`` for any C pointer, and ``"array"`` for JavaScript arrays and typed arrays; note that arrays are 8-bit), or for a void function it can be ``null`` (note: the JavaScript ``null`` value, not a string containing the word "null"). :param argTypes: An array of the types of arguments for the function (if there are no arguments, this can be omitted). Types are as in ``returnType``, except that ``array`` is not supported as there is no way for us to know the length of the array). :returns: A JavaScript function that can be used for running the C function.