Deep copy a node: heap-dup all string fields so the binding owns them */
| 2242 | |
| 2243 | /* Deep copy a node: heap-dup all string fields so the binding owns them */ |
| 2244 | static void node_deep_copy(cbm_node_t *dst, const cbm_node_t *src) { |
| 2245 | *dst = *src; |
| 2246 | dst->project = heap_strdup(src->project); |
| 2247 | dst->label = heap_strdup(src->label); |
| 2248 | dst->name = heap_strdup(src->name); |
| 2249 | dst->qualified_name = heap_strdup(src->qualified_name); |
| 2250 | dst->file_path = heap_strdup(src->file_path); |
| 2251 | dst->properties_json = heap_strdup(src->properties_json); |
| 2252 | } |
| 2253 | |
| 2254 | static void node_fields_free(cbm_node_t *n) { |
| 2255 | if (!n) { |
no test coverage detected