MCPcopy Create free account
hub / github.com/WheretIB/nullc / AutoArray

Method AutoArray

NULLC/StdLib.cpp:879–889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879void NULLC::AutoArray(NULLCAutoArray* arr, int type, unsigned count)
880{
881 if((unsigned long long)count * linker->exTypes[type].size > globalMemoryLimit)
882 {
883 nullcThrowError("ERROR: can't allocate array with %u elements of size %u", count, linker->exTypes[type].size);
884 return;
885 }
886 arr->typeID = type;
887 arr->len = count;
888 arr->ptr = (char*)AllocObject(count * linker->exTypes[type].size);
889}
890
891void NULLC::AutoArraySet(NULLCRef x, unsigned pos, NULLCAutoArray* arr)
892{

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.70

Tested by

no test coverage detected