use create_local

This commit is contained in:
James McKaskill 2013-09-12 14:42:30 -04:00
parent ca1d07f657
commit 448021e7e1
3 changed files with 7 additions and 4 deletions

2
capn.c
View file

@ -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;