MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / allocate

Method allocate

source/core/StarLua.cpp:672–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670}
671
672void* LuaEngine::allocate(void*, void* ptr, size_t oldSize, size_t newSize) {
673 if (newSize == 0) {
674 Star::free(ptr, oldSize);
675 return nullptr;
676 } else {
677 return Star::realloc(ptr, newSize);
678 }
679}
680
681void LuaEngine::handleError(lua_State* state, int res) {
682 if (res != LUA_OK) {

Callers

nothing calls this directly

Calls 2

freeFunction · 0.70
reallocFunction · 0.70

Tested by

no test coverage detected