mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lws_struct: add CHILD_PTR setting
This commit is contained in:
parent
37f3244076
commit
568fa014ce
1 changed files with 9 additions and 1 deletions
|
@ -270,12 +270,20 @@ lws_struct_default_lejp_cb(struct lejp_ctx *ctx, char reason)
|
|||
lwsl_info("%s: created '%s' object size %d\n", __func__,
|
||||
pmap->colname, (int)pmap->aux);
|
||||
|
||||
if (pmap->type == LSMT_LIST) {
|
||||
switch (pmap->type) {
|
||||
case LSMT_LIST:
|
||||
list = (struct lws_dll2 *)
|
||||
((char *)ctx->pst[ctx->pst_sp].user +
|
||||
pmap->ofs_clist);
|
||||
|
||||
lws_dll2_add_tail(list, owner);
|
||||
break;
|
||||
case LSMT_CHILD_PTR:
|
||||
*((void **)owner) = ctx->pst[ctx->pst_sp].user;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue