| 814 | */ |
| 815 | |
| 816 | YAML_DECLARE(int) |
| 817 | yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor) |
| 818 | { |
| 819 | yaml_mark_t mark = { 0, 0, 0 }; |
| 820 | yaml_char_t *anchor_copy = NULL; |
| 821 | |
| 822 | assert(event); /* Non-NULL event object is expected. */ |
| 823 | assert(anchor); /* Non-NULL anchor is expected. */ |
| 824 | |
| 825 | if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0; |
| 826 | |
| 827 | anchor_copy = yaml_strdup(anchor); |
| 828 | if (!anchor_copy) |
| 829 | return 0; |
| 830 | |
| 831 | ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark); |
| 832 | |
| 833 | return 1; |
| 834 | } |
| 835 | |
| 836 | /* |
| 837 | * Create SCALAR. |
no test coverage detected