| 505 | return 0; |
| 506 | } |
| 507 | cson_value *cson_array_get(cson_array *ar, unsigned int pos) |
| 508 | { |
| 509 | cson__render(ar->value); |
| 510 | char path[256]; |
| 511 | sprintf(path, "$[%d]", pos); |
| 512 | cson_get *get = cson__get(ar->value, path); |
| 513 | if (!get) { |
| 514 | return NULL; |
| 515 | } |
| 516 | LIST_INSERT_HEAD(&ar->get_list, get, entry); |
| 517 | return get->value; |
| 518 | } |
| 519 | unsigned int cson_array_length_get(cson_array const *ar) |
| 520 | { |
| 521 | cson__render(ar->value); |