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

Function das_array_reserve

src/misc/daScriptC.cpp:1138–1146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1136}
1137
1138void das_array_reserve ( das_context * context, das_array * arr, uint32_t capacity, uint32_t stride ) {
1139 // Same guard as das_array_clear: stride==0 with non-zero capacity reaches
1140 // Context::reallocate(_, _, 0) which fires DAS_VERIFYF in MemoryModel.
1141 if ( capacity && !stride ) {
1142 ((Context *)context)->throw_error("das_array_reserve: stride must be non-zero when capacity > 0");
1143 return;
1144 }
1145 array_reserve(*(Context *)context, *(Array *)arr, capacity, stride, nullptr);
1146}
1147
1148void das_array_reserve_i64 ( das_context * context, das_array * arr, uint64_t capacity, uint32_t stride ) {
1149 if ( capacity && !stride ) {

Callers

nothing calls this directly

Calls 2

array_reserveFunction · 0.85
throw_errorMethod · 0.80

Tested by

no test coverage detected