MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / array_set

Function array_set

Source/Wasm/WasmRuntime.cpp:1739–1746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737/* Array */
1738
1739DORA_EXPORT int32_t array_set(int64_t array, int32_t index, int64_t v) {
1740 auto arr = r_cast<Array*>(array);
1741 if (0 <= index && index < s_cast<int32_t>(arr->getCount())) {
1742 arr->set(index, Value_To(*r_cast<dora_val_t*>(v)));
1743 return 1;
1744 }
1745 return 0;
1746}
1747DORA_EXPORT int64_t array_get(int64_t array, int32_t index) {
1748 auto arr = r_cast<Array*>(array);
1749 if (0 <= index && index < s_cast<int32_t>(arr->getCount())) {

Callers 1

setMethod · 0.85

Calls 3

Value_ToFunction · 0.85
setMethod · 0.65
getCountMethod · 0.45

Tested by

no test coverage detected