X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Ftypes.h;h=e0c4b07106901079abd372701e4dfa634b8899b5;hp=df267a05539e9bc948fecc87f7afad2bf5098c14;hb=216e7ac3b97aed5a5d65c511dc061c78be90e79d;hpb=09529efcde471127419e141807b83b37077003a0 diff --git a/src/types.h b/src/types.h index df267a0..e0c4b07 100644 --- a/src/types.h +++ b/src/types.h @@ -85,39 +85,4 @@ static inline impl_val *deref_impl_val(impl_val *ret_val, struct psi_decl_var *v return ret_val; } -static inline impl_val *enref_impl_val(void *ptr, struct psi_decl_var *var) { - impl_val *val, *val_ptr; - unsigned i; - - ZEND_ASSERT(var->arg->var == var); -#if 0 - fprintf(stderr, "enref: %s pl=%u:%u as=%u:%u\n", - var->name->val, 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) { - return ptr; - } - - val = calloc(var->pointer_level + 1, sizeof(void *)); - val_ptr = val; - for (i = !var->arg->var->array_size; i < var->pointer_level; ++i) { -#if 0 - fprintf(stderr, "++\n"); -#endif - val_ptr->ptr = (void **) val_ptr + 1; - val_ptr = val_ptr->ptr; - } - val_ptr->ptr = ptr; - return val; -} - -static inline impl_val *struct_member_ref(struct psi_decl_arg *set_arg, impl_val *struct_ptr, impl_val **to_free) { - void *ptr = (char *) struct_ptr + set_arg->layout->pos; -#if 0 - fprintf(stderr, "struct member %s: %p\n", set_arg->var->name->val, ptr); -#endif - return ptr; -} - #endif