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

Function surface_py_string

src/pipeline/lsp_surface.c:170–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170static bool surface_py_string(yyjson_val *value, bool nullable, const char **out) {
171 *out = NULL;
172 if (!value) {
173 return false;
174 }
175 if (yyjson_is_null(value)) {
176 return nullable;
177 }
178 const char *text = yyjson_get_str(value);
179 if (!text || strlen(text) != yyjson_get_len(value)) {
180 return false;
181 }
182 *out = text;
183 return true;
184}
185
186/* Arrays belong to scratch; strings borrow the immutable JSON document.
187 * The caller keeps both alive until validation/copy/comparison is finished. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected