use create_local
This commit is contained in:
parent
ca1d07f657
commit
448021e7e1
3 changed files with 7 additions and 4 deletions
2
capn.c
2
capn.c
|
|
@ -662,7 +662,7 @@ static int copy_ptr(struct capn_segment *seg, char *data, struct capn_ptr *t, st
|
|||
|
||||
/* need to allocate a struct copy */
|
||||
if (!cs || cs->len + sizeof(*n) > cs->cap) {
|
||||
cs = c->create ? c->create(c->user, CAPN_SEGID_LOCAL, sizeof(*n)) : NULL;
|
||||
cs = c->create_local ? c->create_local(c->user, sizeof(*n)) : NULL;
|
||||
if (!cs) {
|
||||
/* can't allocate a copy structure */
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue