MCPcopy Create free account
hub / github.com/creatale/node-dv / cvMemStorageAllocString

Function cvMemStorageAllocString

deps/opencv/modules/core/src/datastructs.cpp:345–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344
345CV_IMPL CvString
346cvMemStorageAllocString( CvMemStorage* storage, const char* ptr, int len )
347{
348 CvString str;
349 memset(&str, 0, sizeof(CvString));
350
351 str.len = len >= 0 ? len : (int)strlen(ptr);
352 str.ptr = (char*)cvMemStorageAlloc( storage, str.len + 1 );
353 memcpy( str.ptr, ptr, str.len );
354 str.ptr[str.len] = '\0';
355
356 return str;
357}
358
359
360/****************************************************************************************\

Callers 4

persistence.cppFile · 0.85
icvYMLParseValueFunction · 0.85
icvXMLParseValueFunction · 0.85
icvXMLStartWriteStructFunction · 0.85

Calls 1

cvMemStorageAllocFunction · 0.85

Tested by

no test coverage detected