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

Function sp_program

tests/test_spawns.c:91–101  ·  view source on GitHub ↗

Program of `callee(arg0, arg1)` as the extractor records it. */

Source from the content-addressed store, hash-verified

89
90/* Program of `callee(arg0, arg1)` as the extractor records it. */
91static const char *sp_program(CBMLanguage lang, const char *callee, const char *arg0,
92 const char *arg1, const CBMImport *imports, int count, char *buf) {
93 CBMCallArg args[2] = {{.expr = arg0, .index = 0}, {.expr = arg1, .index = 1}};
94 CBMCall call = {.callee_name = callee, .args = args, .arg_count = arg1 ? 2 : (arg0 ? 1 : 0)};
95 const cbm_spawn_api_t *api = cbm_spawn_match(lang, callee, imports, count);
96 if (!api) {
97 return "(no match)";
98 }
99 cbm_spawn_program(api, lang, &call, buf, CBM_SPAWN_PROGRAM_MAX);
100 return buf;
101}
102
103TEST(spawn_program_rules) {
104 char b[CBM_SPAWN_PROGRAM_MAX];

Callers 1

test_spawns.cFile · 0.85

Calls 2

cbm_spawn_matchFunction · 0.85
cbm_spawn_programFunction · 0.85

Tested by

no test coverage detected