Fix ap() when used with jsWrapFunWithResult
What does this MR do?
When using jsWrapFunWithResult
, the result is of type
(String, *JSWorld)
where the String
can be eval
uated in the
JavaScript context. Because a String
is internally a _STRING_
node
wrapped by an ARRAY
node, this looks like:
[_Tuple, [ARRAY, [_STRING_, size, val]], [JSWorld, val]]
To get to the string value we need to unwrap one more time than was
previously done, hence the addition of array_ptr
besides hp_ptr
and str_ptr
.
Related issues
The failing job in itasks-sdk!583 (merged).
Changes to public APIs
None.
Author's checklist (required)
See CONTRIBUTING.md for the rationale behind these items:
-
The commit history does not contain merges (use git rebase -i master
if it does) -
Intermediate commits compile (use git rebase -i master
if not) -
Newly added code has a style consistent with the existing code -
Newly added code is documented -
A changelog entry has been added if required. See CONTRIBUTING.md -
If bugs have been solved, tests have been added -
Appropriate types have been used, especially in APIs -
If efficiency is part of the acceptance criteria of the issue, a benchmark is provided -
If enum instruction
in src/abc_instructions.h has changed,ABC_VERSION
in src/settings.h has been increased
Edited by Camil Staps