X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.h;h=de5ba10fbdebede9a99037a54a0e393b121e834c;hp=b27fdafccbe96ec22286b64f83f3d39b117267a1;hb=2454ceb434f8190937580d1cca96f5737908224e;hpb=772c1e688a51b32331fae7993429b3a03d766d8d diff --git a/src/parser.h b/src/parser.h index b27fdaf..de5ba10 100644 --- a/src/parser.h +++ b/src/parser.h @@ -43,6 +43,9 @@ typedef union impl_val { uint64_t u64; float fval; double dval; +#ifdef HAVE_LONG_DOUBLE + long double ldval; +#endif union { zend_bool bval; zend_long lval; @@ -320,7 +323,7 @@ typedef struct decl_callinfo { void *info; size_t argc; void **args; - void *rval; + void **rval; } decl_callinfo; typedef struct decl { @@ -377,6 +380,10 @@ typedef struct decl_struct { char *name; decl_args *args; size_t size; + struct { + void *type; + void (*dtor)(void *type); + } engine; } decl_struct; static inline decl_struct *init_decl_struct(const char *name, decl_args *args) { @@ -393,6 +400,9 @@ static inline void free_decl_struct(decl_struct *s) { if (s->args) { free_decl_args(s->args); } + if (s->engine.type && s->engine.dtor) { + s->engine.dtor(s->engine.type); + } free(s->name); free(s); } @@ -1206,7 +1216,7 @@ static inline impl_val *enref_impl_val(void *ptr, decl_var *var) { var->name, var->pointer_level, var->arg->var->pointer_level, var->array_size, var->arg->var->array_size); #endif - if (!var->pointer_level && real_decl_type(var->arg->type)->type != PSI_T_STRUCT) { + if (!var->pointer_level ){//&& real_decl_type(var->arg->type)->type != PSI_T_STRUCT) { return ptr; }