MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / py_namespace_copy_string

Function py_namespace_copy_string

internal/cbm/cbm.c:237–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237static bool py_namespace_copy_string(CBMArena *arena, const char *source, const char **out) {
238 *out = NULL;
239 if (!source)
240 return true;
241 size_t len = strlen(source);
242 if (len == SIZE_MAX)
243 return false;
244 char *copy = py_namespace_copy_alloc(arena, len + 1);
245 if (!copy)
246 return false;
247 memcpy(copy, source, len + 1);
248 *out = copy;
249 return true;
250}
251
252bool cbm_py_namespace_facts_copy(CBMArena *arena, const CBMPyNamespaceFacts *source,
253 CBMPyNamespaceFacts *out) {

Callers 1

Calls 1

py_namespace_copy_allocFunction · 0.85

Tested by

no test coverage detected