MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / alloc_buffer

Function alloc_buffer

src/hx/CFFI.cpp:569–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567
568
569buffer alloc_buffer(const char *inStr)
570{
571 int len = inStr ? strlen(inStr) : 0;
572 ByteArray b = new Array_obj<unsigned char>(len,len);
573 if (len)
574 memcpy(b->GetBase(),inStr,len);
575 return (buffer)b;
576}
577
578
579buffer alloc_buffer_len(int inLen)

Callers 3

valToStringFunction · 0.85
subBufferFunction · 0.85
charStringFunction · 0.85

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected