MCPcopy Create free account
hub / github.com/MultiMC/Launcher / create_array_in_array

Function create_array_in_array

libraries/tomlc99/src/toml.c:865–883  ·  view source on GitHub ↗

Create an array in an array */

Source from the content-addressed store, hash-verified

863/* Create an array in an array
864 */
865static toml_array_t* create_array_in_array(context_t* ctx,
866 toml_array_t* parent)
867{
868 const int n = parent->nitem;
869 toml_arritem_t* base = expand_arritem(parent->item, n);
870 if (!base) {
871 e_outofmemory(ctx, FLINE);
872 return 0;
873 }
874 toml_array_t* ret = (toml_array_t*) CALLOC(1, sizeof(toml_array_t));
875 if (!ret) {
876 e_outofmemory(ctx, FLINE);
877 return 0;
878 }
879 base[n].arr = ret;
880 parent->item = base;
881 parent->nitem++;
882 return ret;
883}
884
885/* Create a table in an array
886 */

Callers 1

parse_arrayFunction · 0.85

Calls 3

expand_arritemFunction · 0.85
e_outofmemoryFunction · 0.85
CALLOCFunction · 0.85

Tested by

no test coverage detected