MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / yaml_string_extend

Function yaml_string_extend

external/libyaml/src/api.c:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 */
72
73YAML_DECLARE(int)
74yaml_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.

Callers 3

yaml_parser_scan_tag_uriFunction · 0.85
yaml_string_joinFunction · 0.85
yaml_private.hFile · 0.85

Calls 1

yaml_reallocFunction · 0.85

Tested by

no test coverage detected