MCPcopy Create free account
hub / github.com/ProjectPhysX/FluidX3D / alloc_string_sized

Function alloc_string_sized

src/lodepng.cpp:299–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299static char* alloc_string_sized(const char* in, size_t insize) {
300 char* out = (char*)lodepng_malloc(insize + 1);
301 if(out) {
302 lodepng_memcpy(out, in, insize);
303 out[insize] = 0;
304 }
305 return out;
306}
307
308/* dynamically allocates a new string with a copy of the null terminated input text */
309static char* alloc_string(const char* in) {

Callers 3

alloc_stringFunction · 0.85
lodepng_add_text_sizedFunction · 0.85
lodepng_add_itext_sizedFunction · 0.85

Calls 2

lodepng_mallocFunction · 0.85
lodepng_memcpyFunction · 0.85

Tested by

no test coverage detected