Create an array in an array */
| 863 | /* Create an array in an array |
| 864 | */ |
| 865 | static 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 | */ |
no test coverage detected