forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add C++20 std::span-based APIs for function arguments (facebook#43489)
Summary: Changelog: [General][Changed] - Add `std::span` methods to `jsi::Function` when compiled as C++20 Adds `std::span<const jsi::Value>` overloads to public JSI methods that currently accept (or are designed to emit) `const jsi::Value* args, size_t count` for a dynamically-sized span of function arguments. These are: * `Function::call` * `Function::callWithThis` * `Function::callAsConstructor` * `Function::createFromHostFunction` ## Backwards compatibility * The new APIs are compiled conditionally to support pre-C++20 compilers. * No overloads are removed. * The new overloads are implemented as `inline` wrappers over the pointer+size versions. * No change is made to the JSI contract for implementers (i.e. no new overloads, virtual or otherwise, are added to `Runtime`). Differential Revision: D54901847
- Loading branch information
1 parent
a9e6759
commit 61ffa58
Showing
3 changed files
with
256 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters