| 71 | */ |
| 72 | |
| 73 | YAML_DECLARE(int) |
| 74 | yaml_string_extend(yaml_char_t **start, |
| 75 | yaml_char_t **pointer, yaml_char_t **end) |
| 76 | { |
| 77 | yaml_char_t *new_start = (yaml_char_t *)yaml_realloc((void*)*start, (*end - *start)*2); |
| 78 | |
| 79 | if (!new_start) return 0; |
| 80 | |
| 81 | memset(new_start + (*end - *start), 0, *end - *start); |
| 82 | |
| 83 | *pointer = new_start + (*pointer - *start); |
| 84 | *end = new_start + (*end - *start)*2; |
| 85 | *start = new_start; |
| 86 | |
| 87 | return 1; |
| 88 | } |
| 89 | |
| 90 | /* |
| 91 | * Append a string B to a string A. |
no test coverage detected