MCPcopy Create free account
hub / github.com/apache/kvrocks / PushArray

Function PushArray

src/storage/scripting.cc:1489–1495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1487}
1488
1489void PushArray(lua_State *lua, const std::vector<std::string> &elems) {
1490 lua_newtable(lua);
1491 for (size_t i = 0; i < elems.size(); i++) {
1492 lua_pushlstring(lua, elems[i].c_str(), elems[i].size());
1493 lua_rawseti(lua, -2, static_cast<int>(i) + 1);
1494 }
1495}
1496
1497/* ---------------------------------------------------------------------------
1498 * Redis provided math.random

Callers 2

FunctionCallFunction · 0.85
SetGlobalArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected