save works

This commit is contained in:
Rongsong Shen 2026-03-06 18:20:30 +08:00
parent 47fc32b02c
commit 43dc12a36c
19 changed files with 80 additions and 72 deletions

View file

@ -126,13 +126,15 @@ static xce_resource_t* makeResource_(var resmgr, xce_resource_t* r)
resobj = makeInstance(&resobj_type, r);
if (resobj != NULL) {
rc = key_add(resmgr, (void*)resobj->name, (void*)resobj);
if (rc < 0) {
destroy(resobj);
errno = -rc;
return NULL;
}
resobj->idx = rc;
}
return resobj;
}