MCPcopy Create free account
hub / github.com/ElementsProject/elements / CopyString

Function CopyString

src/leveldb/db/c.cc:159–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159static char* CopyString(const std::string& str) {
160 char* result = reinterpret_cast<char*>(malloc(sizeof(char) * str.size()));
161 memcpy(result, str.data(), sizeof(char) * str.size());
162 return result;
163}
164
165leveldb_t* leveldb_open(const leveldb_options_t* options, const char* name,
166 char** errptr) {

Callers 1

leveldb_getFunction · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected