Deep copy a node: heap-dup all string fields so the binding owns them */
| 2443 | |
| 2444 | /* Deep copy a node: heap-dup all string fields so the binding owns them */ |
| 2445 | static void node_deep_copy(cbm_node_t *dst, const cbm_node_t *src) { |
| 2446 | *dst = *src; |
| 2447 | dst->project = heap_strdup(src->project); |
| 2448 | dst->label = heap_strdup(src->label); |
| 2449 | dst->name = heap_strdup(src->name); |
| 2450 | dst->qualified_name = heap_strdup(src->qualified_name); |
| 2451 | dst->file_path = heap_strdup(src->file_path); |
| 2452 | dst->properties_json = heap_strdup(src->properties_json); |
| 2453 | } |
| 2454 | |
| 2455 | static void node_fields_free(cbm_node_t *n) { |
| 2456 | if (!n) { |
no test coverage detected