MCPcopy Create free account
hub / github.com/F-Stack/f-stack / strbuf_free_to_string

Function strbuf_free_to_string

app/redis-6.2.6/deps/lua/src/strbuf.c:116–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116char *strbuf_free_to_string(strbuf_t *s, int *len)
117{
118 char *buf;
119
120 debug_stats(s);
121
122 strbuf_ensure_null(s);
123
124 buf = s->buf;
125 if (len)
126 *len = s->length;
127
128 if (s->dynamic)
129 free(s);
130
131 return buf;
132}
133
134static int calculate_new_size(strbuf_t *s, int len)
135{

Callers

nothing calls this directly

Calls 3

debug_statsFunction · 0.85
strbuf_ensure_nullFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected