X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.h;h=d8955e56d2294394b996f260bc98b040d7ea59fe;hp=67252e24855b9aa5cae8c0a68c01def1e2587d3b;hb=2d013b4e72d2c803817441fa13cadcac357df276;hpb=d560a27ff8431c678d25ecf4d8190b562a766f41 diff --git a/src/parser.h b/src/parser.h index 67252e2..d8955e5 100644 --- a/src/parser.h +++ b/src/parser.h @@ -234,7 +234,12 @@ typedef struct decl { decl_abi *abi; decl_arg *func; decl_args *args; - void *dlptr; + struct impl *impl; + struct { + void *sym; + void *info; + void **args; + } call; } decl; static inline decl* init_decl(decl_abi *abi, decl_arg *func, decl_args *args) { @@ -359,7 +364,7 @@ static inline impl_val *enref_impl_val(void *ptr, decl_var *var) { if (!var->pointer_level && real_decl_type(var->arg->type)->type != PSI_T_STRUCT) { return ptr; } - val = val_ptr = calloc(var->pointer_level, sizeof(void *)); + val = val_ptr = calloc(var->pointer_level + 1, sizeof(void *)); for (i = 1; i < var->pointer_level; ++i) { val_ptr->ptr = (void **) val_ptr + 1; val_ptr = val_ptr->ptr;