chore: import upstream snapshot with attribution
CI / Deep Native Runtime Cases (1/6) (push) Has been skipped
CI / Native Preflight (push) Failing after 1s
CI / Native Runtime Cases (1/2) (push) Failing after 0s
CI / Native Runtime Cases (2/2) (push) Failing after 1s
CI / Native Metadata Reports (push) Failing after 0s
CI / Native Direct Backend Artifacts (push) Failing after 0s
CI / Native Sanitizer Smoke (push) Failing after 1s
CI / Command Contract Snapshots (push) Failing after 1s
CI / Deep Conformance Suite (push) Has been skipped
CI / Graph Build Perf (push) Failing after 1s
CI / Deep Native Preflight (push) Has been skipped
CI / Deep Native Runtime Cases (2/6) (push) Has been skipped
CI / Deep Native Runtime Cases (3/6) (push) Has been skipped
CI / Conformance Suite (push) Failing after 1s
CI / Workspace Checks (push) Failing after 0s
CI / Deep Native Runtime Cases (5/6) (push) Has been skipped
CI / Deep Native Runtime Cases (6/6) (push) Has been skipped
CI / Deep Native Runtime Cases (4/6) (push) Has been skipped
CI / Deep Graph Build Perf (push) Has been skipped

This commit is contained in:
wehub-resource-sync
2026-07-13 12:29:30 +08:00
commit e7738de6d2
1723 changed files with 216139 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#include "program_graph.h"
#include <stdlib.h>
void z_program_graph_init(ZProgramGraph *graph) {
*graph = (ZProgramGraph){
.schema_version = 1,
.validation_state = Z_PROGRAM_GRAPH_VALIDATION_DECODED,
.module_identity = z_strdup("module:main"),
};
}
void z_program_graph_free(ZProgramGraph *graph) {
if (!graph) return;
for (size_t i = 0; i < graph->node_len; i++) {
free(graph->nodes[i].id);
free(graph->nodes[i].name);
free(graph->nodes[i].type);
free(graph->nodes[i].value);
free(graph->nodes[i].path);
free(graph->nodes[i].symbol_id);
free(graph->nodes[i].type_id);
free(graph->nodes[i].effect_id);
free(graph->nodes[i].node_hash);
}
for (size_t i = 0; i < graph->edge_len; i++) {
free(graph->edges[i].from);
free(graph->edges[i].to);
free(graph->edges[i].kind);
}
free(graph->module_identity);
free(graph->graph_hash);
free(graph->nodes);
free(graph->edges);
*graph = (ZProgramGraph){0};
}