MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / remove

Function remove

extlibs/sol3/include/sol/sol.hpp:8422–8446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8420
8421 namespace stack {
8422 inline void remove(lua_State* L, int rawindex, int count) {
8423 if (count < 1)
8424 return;
8425 int top = lua_gettop(L);
8426 if (top < 1) {
8427 return;
8428 }
8429 if (rawindex == -count || top == rawindex) {
8430 // Slice them right off the top
8431 lua_pop(L, static_cast<int>(count));
8432 return;
8433 }
8434
8435 // Remove each item one at a time using stack operations
8436 // Probably slower, maybe, haven't benchmarked,
8437 // but necessary
8438 int index = lua_absindex(L, rawindex);
8439 if (index < 0) {
8440 index = lua_gettop(L) + (index + 1);
8441 }
8442 int last = index + count;
8443 for (int i = index; i < last; ++i) {
8444 lua_remove(L, index);
8445 }
8446 }
8447
8448 struct push_popper_at {
8449 lua_State* L;

Callers 15

deleteFileFunction · 0.85
deleteDirectoryFunction · 0.85
removeTagMethod · 0.85
removeChildMethod · 0.85
RemoveComponentMethod · 0.85
~TempFileMethod · 0.85
popScopedMessageMethod · 0.85
os-inl.hFile · 0.85
rename_fileMethod · 0.85
remove_sinkMethod · 0.85
os_removeFunction · 0.85
unzRepairFunction · 0.85

Calls 2

lua_gettopFunction · 0.85
lua_absindexFunction · 0.70

Tested by

no test coverage detected