MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / strbuf_new

Function strbuf_new

deps/lua/src/strbuf.c:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68strbuf_t *strbuf_new(int len)
69{
70 strbuf_t *s;
71
72 s = malloc(sizeof(strbuf_t));
73 if (!s)
74 die("Out of memory");
75
76 strbuf_init(s, len);
77
78 /* Dynamic strbuf allocation / deallocation */
79 s->dynamic = 1;
80
81 return s;
82}
83
84void strbuf_set_increment(strbuf_t *s, int increment)
85{

Callers 1

json_decodeFunction · 0.85

Calls 3

mallocFunction · 0.85
dieFunction · 0.85
strbuf_initFunction · 0.85

Tested by

no test coverage detected