MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / array_clear

Function array_clear

src/simulate/runtime_array.cpp:7–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace das
6{
7 void array_clear ( Context & context, Array & arr, LineInfo * at ) {
8 if ( arr.isLocked() ) context.throw_error_at(at, "can't clear locked array");
9 arr.size = 0;
10 }
11
12 void array_mark_locked ( Array & arr, void * data, uint64_t capacity ) {
13 arr.data = (char *)data;

Callers 2

beforeArrayMethod · 0.85
builtin_array_clearFunction · 0.85

Calls 2

isLockedMethod · 0.80
throw_error_atMethod · 0.80

Tested by

no test coverage detected