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

Function create_table_in_array

libraries/tomlc99/src/toml.c:887–905  ·  view source on GitHub ↗

Create a table in an array */

Source from the content-addressed store, hash-verified

885/* Create a table in an array
886 */
887static toml_table_t* create_table_in_array(context_t* ctx,
888 toml_array_t* parent)
889{
890 int n = parent->nitem;
891 toml_arritem_t* base = expand_arritem(parent->item, n);
892 if (!base) {
893 e_outofmemory(ctx, FLINE);
894 return 0;
895 }
896 toml_table_t* ret = (toml_table_t*) CALLOC(1, sizeof(toml_table_t));
897 if (!ret) {
898 e_outofmemory(ctx, FLINE);
899 return 0;
900 }
901 base[n].tab = ret;
902 parent->item = base;
903 parent->nitem++;
904 return ret;
905}
906
907
908static int skip_newlines(context_t* ctx, int isdotspecial)

Callers 2

parse_arrayFunction · 0.85
parse_selectFunction · 0.85

Calls 3

expand_arritemFunction · 0.85
e_outofmemoryFunction · 0.85
CALLOCFunction · 0.85

Tested by

no test coverage detected