MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / binsearch

Function binsearch

third-party/lua-5.4.6/src/ltable.c:895–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893
894
895static unsigned int binsearch (const TValue *array, unsigned int i,
896 unsigned int j) {
897 while (j - i > 1u) { /* binary search */
898 unsigned int m = (i + j) / 2;
899 if (isempty(&array[m - 1])) j = m;
900 else i = m;
901 }
902 return i;
903}
904
905
906/*

Callers 1

luaH_getnFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected