Lines Matching refs:cdata

258 	zend_ffi_cdata *cdata;  in zend_ffi_cdata_new()  local
260 cdata = emalloc(sizeof(zend_ffi_cdata)); in zend_ffi_cdata_new()
262 zend_ffi_object_init(&cdata->std, class_type); in zend_ffi_cdata_new()
264 cdata->type = NULL; in zend_ffi_cdata_new()
265 cdata->ptr = NULL; in zend_ffi_cdata_new()
266 cdata->flags = 0; in zend_ffi_cdata_new()
268 return &cdata->std; in zend_ffi_cdata_new()
492 zend_ffi_cdata *cdata = emalloc(sizeof(zend_ffi_cdata)); in zend_ffi_cdata_to_zval_slow() local
494 zend_ffi_object_init(&cdata->std, zend_ffi_cdata_ce); in zend_ffi_cdata_to_zval_slow()
495 cdata->std.handlers = in zend_ffi_cdata_to_zval_slow()
499 cdata->type = type; in zend_ffi_cdata_to_zval_slow()
500 cdata->flags = flags; in zend_ffi_cdata_to_zval_slow()
501 cdata->ptr = ptr; in zend_ffi_cdata_to_zval_slow()
502 return cdata; in zend_ffi_cdata_to_zval_slow()
508 zend_ffi_cdata *cdata = emalloc(sizeof(zend_ffi_cdata)); in zend_ffi_cdata_to_zval_slow_ptr() local
510 zend_ffi_object_init(&cdata->std, zend_ffi_cdata_ce); in zend_ffi_cdata_to_zval_slow_ptr()
511 cdata->type = type; in zend_ffi_cdata_to_zval_slow_ptr()
512 cdata->flags = flags; in zend_ffi_cdata_to_zval_slow_ptr()
513 cdata->ptr = (void*)&cdata->ptr_holder; in zend_ffi_cdata_to_zval_slow_ptr()
514 *(void**)cdata->ptr = *(void**)ptr; in zend_ffi_cdata_to_zval_slow_ptr()
515 return cdata; in zend_ffi_cdata_to_zval_slow_ptr()
521 zend_ffi_cdata *cdata = emalloc(sizeof(zend_ffi_cdata)); in zend_ffi_cdata_to_zval_slow_ret() local
523 zend_ffi_object_init(&cdata->std, zend_ffi_cdata_ce); in zend_ffi_cdata_to_zval_slow_ret()
524 cdata->std.handlers = in zend_ffi_cdata_to_zval_slow_ret()
528 cdata->type = type; in zend_ffi_cdata_to_zval_slow_ret()
529 cdata->flags = flags; in zend_ffi_cdata_to_zval_slow_ret()
531 cdata->ptr = (void*)&cdata->ptr_holder; in zend_ffi_cdata_to_zval_slow_ret()
532 *(void**)cdata->ptr = *(void**)ptr; in zend_ffi_cdata_to_zval_slow_ret()
534 cdata->ptr = emalloc(type->size); in zend_ffi_cdata_to_zval_slow_ret()
535 cdata->flags |= ZEND_FFI_FLAG_OWNED; in zend_ffi_cdata_to_zval_slow_ret()
536 memcpy(cdata->ptr, ptr, type->size); in zend_ffi_cdata_to_zval_slow_ret()
538 cdata->ptr = ptr; in zend_ffi_cdata_to_zval_slow_ret()
540 return cdata; in zend_ffi_cdata_to_zval_slow_ret()
544 static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_ty… in zend_ffi_cdata_to_zval() argument
606 if (!cdata) { in zend_ffi_cdata_to_zval()
608 cdata = zend_ffi_cdata_to_zval_slow_ret(ptr, type, flags); in zend_ffi_cdata_to_zval()
610 cdata = zend_ffi_cdata_to_zval_slow_ptr(ptr, type, flags); in zend_ffi_cdata_to_zval()
613 GC_ADDREF(&cdata->std); in zend_ffi_cdata_to_zval()
615 ZVAL_OBJ(rv, &cdata->std); in zend_ffi_cdata_to_zval()
622 if (!cdata) { in zend_ffi_cdata_to_zval()
624 cdata = zend_ffi_cdata_to_zval_slow_ret(ptr, type, flags); in zend_ffi_cdata_to_zval()
626 cdata = zend_ffi_cdata_to_zval_slow(ptr, type, flags); in zend_ffi_cdata_to_zval()
629 GC_ADDREF(&cdata->std); in zend_ffi_cdata_to_zval()
631 ZVAL_OBJ(rv, &cdata->std); in zend_ffi_cdata_to_zval()
746 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(value); in zend_ffi_zval_to_cdata() local
747 if (zend_ffi_is_compatible_type(type, ZEND_FFI_TYPE(cdata->type)) && in zend_ffi_zval_to_cdata()
748 type->size == ZEND_FFI_TYPE(cdata->type)->size) { in zend_ffi_zval_to_cdata()
749 memcpy(ptr, cdata->ptr, type->size); in zend_ffi_zval_to_cdata()
823 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(value); in zend_ffi_zval_to_cdata() local
825 if (zend_ffi_is_compatible_type(type, ZEND_FFI_TYPE(cdata->type))) { in zend_ffi_zval_to_cdata()
826 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_zval_to_cdata()
827 *(void**)ptr = *(void**)cdata->ptr; in zend_ffi_zval_to_cdata()
829 if (cdata->flags & ZEND_FFI_FLAG_OWNED) { in zend_ffi_zval_to_cdata()
833 *(void**)ptr = cdata->ptr; in zend_ffi_zval_to_cdata()
837 } else if (ZEND_FFI_TYPE(cdata->type)->kind != ZEND_FFI_TYPE_POINTER in zend_ffi_zval_to_cdata()
838 … && zend_ffi_is_compatible_type(ZEND_FFI_TYPE(type->pointer.type), ZEND_FFI_TYPE(cdata->type))) { in zend_ffi_zval_to_cdata()
839 if (cdata->flags & ZEND_FFI_FLAG_OWNED) { in zend_ffi_zval_to_cdata()
843 *(void**)ptr = cdata->ptr; in zend_ffi_zval_to_cdata()
1103 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_get() local
1104 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_get()
1107 if (UNEXPECTED(!cdata->ptr)) { in zend_ffi_cdata_get()
1118 zend_ffi_cdata_to_zval(cdata, cdata->ptr, type, BP_VAR_R, rv, 0, 0, 0); in zend_ffi_cdata_get()
1125 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_set() local
1126 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_set()
1129 if (UNEXPECTED(!cdata->ptr)) { in zend_ffi_cdata_set()
1140 zend_ffi_zval_to_cdata(cdata->ptr, type, value); in zend_ffi_cdata_set()
1149 zend_ffi_cdata *cdata = (zend_ffi_cdata*)readobj; in zend_ffi_cdata_cast_object() local
1150 zend_ffi_type *ctype = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_cast_object()
1151 void *ptr = cdata->ptr; in zend_ffi_cdata_cast_object()
1225 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_read_field() local
1226 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_read_field()
1227 void *ptr = cdata->ptr; in zend_ffi_cdata_read_field()
1255 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1287 …zend_ffi_cdata_to_zval(NULL, ptr, field_type, read_type, rv, (cdata->flags & ZEND_FFI_FLAG_CONST) … in zend_ffi_cdata_read_field()
1298 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_write_field() local
1299 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_write_field()
1300 void *ptr = cdata->ptr; in zend_ffi_cdata_write_field()
1332 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1352 if (UNEXPECTED(cdata->flags & ZEND_FFI_FLAG_CONST)) { in zend_ffi_cdata_write_field()
1372 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_read_dim() local
1373 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_read_dim()
1386 …is_const = (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)(type->attr & ZEND_FFI_ATTR_CONS… in zend_ffi_cdata_read_dim()
1397 if (UNEXPECTED(!cdata->ptr)) { in zend_ffi_cdata_read_dim()
1402 ptr = (void*)(((char*)cdata->ptr) + dim_type->size * dim); in zend_ffi_cdata_read_dim()
1404 …is_const = (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)(type->attr & ZEND_FFI_ATTR_CONS… in zend_ffi_cdata_read_dim()
1413 if (UNEXPECTED(!cdata->ptr)) { in zend_ffi_cdata_read_dim()
1417 ptr = (void*)((*(char**)cdata->ptr) + dim_type->size * dim); in zend_ffi_cdata_read_dim()
1430 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_write_dim() local
1431 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_write_dim()
1449 …is_const = (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)(type->attr & ZEND_FFI_ATTR_CONS… in zend_ffi_cdata_write_dim()
1452 if (UNEXPECTED(!cdata->ptr)) { in zend_ffi_cdata_write_dim()
1457 ptr = (void*)(((char*)cdata->ptr) + type->size * dim); in zend_ffi_cdata_write_dim()
1459 …is_const = (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)(type->attr & ZEND_FFI_ATTR_CONS… in zend_ffi_cdata_write_dim()
1461 if (UNEXPECTED(!cdata->ptr)) { in zend_ffi_cdata_write_dim()
1465 ptr = (void*)((*(char**)cdata->ptr) + type->size * dim); in zend_ffi_cdata_write_dim()
1688 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(arg); in zend_ffi_pass_incompatible() local
1690 type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_pass_incompatible()
1715 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(arg); in zend_ffi_assign_incompatible() local
1717 type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_assign_incompatible()
1748 zend_ffi_cdata *cdata = (zend_ffi_cdata*)zobj; in zend_ffi_cdata_get_class_name() local
1750 return zend_ffi_get_class_name(zobj->ce->name, ZEND_FFI_TYPE(cdata->type)); in zend_ffi_cdata_get_class_name()
1781 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_count_elements() local
1782 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_count_elements()
1798 zend_ffi_cdata *cdata = in zend_ffi_add() local
1813 cdata->type = base_type; in zend_ffi_add()
1839 cdata->type = ZEND_FFI_TYPE_MAKE_OWNED(new_type); in zend_ffi_add()
1842 cdata->ptr = &cdata->ptr_holder; in zend_ffi_add()
1843 cdata->ptr_holder = ptr + in zend_ffi_add()
1845 cdata->flags = base_cdata->flags & ZEND_FFI_FLAG_CONST; in zend_ffi_add()
1846 return &cdata->std; in zend_ffi_add()
1940 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ(iter->it.data); in zend_ffi_cdata_it_valid() local
1941 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_it_valid()
1950 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ(iter->it.data); in zend_ffi_cdata_it_get_current_data() local
1951 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_it_get_current_data()
1955 if (!cdata->ptr) { in zend_ffi_cdata_it_get_current_data()
1967 ptr = (void*)((char*)cdata->ptr + dim_type->size * iter->it.index); in zend_ffi_cdata_it_get_current_data()
1970 …(NULL, ptr, dim_type, iter->by_ref ? BP_VAR_RW : BP_VAR_R, &iter->value, (cdata->flags & ZEND_FFI_… in zend_ffi_cdata_it_get_current_data()
2009 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); in zend_ffi_cdata_get_iterator() local
2010 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_get_iterator()
2035 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_get_debug_info() local
2036 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_get_debug_info()
2037 void *ptr = cdata->ptr; in zend_ffi_cdata_get_debug_info()
2044 if (!cdata->ptr) { in zend_ffi_cdata_get_debug_info()
2068 zend_ffi_cdata_to_zval(cdata, ptr, type, BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0, 0); in zend_ffi_cdata_get_debug_info()
2136 zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; in zend_ffi_cdata_get_closure() local
2137 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_cdata_get_closure()
2153 if (!cdata->ptr) { in zend_ffi_cdata_get_closure()
2181 func->internal_function.reserved[1] = *(void**)cdata->ptr; in zend_ffi_cdata_get_closure()
2389 static void zend_ffi_cdata_dtor(zend_ffi_cdata *cdata) /* {{{ */ in zend_ffi_cdata_dtor() argument
2391 zend_ffi_type_dtor(cdata->type); in zend_ffi_cdata_dtor()
2392 if (cdata->flags & ZEND_FFI_FLAG_OWNED) { in zend_ffi_cdata_dtor()
2393 if (cdata->ptr != (void*)&cdata->ptr_holder) { in zend_ffi_cdata_dtor()
2394 pefree(cdata->ptr, cdata->flags & ZEND_FFI_FLAG_PERSISTENT); in zend_ffi_cdata_dtor()
2396 pefree(cdata->ptr_holder, cdata->flags & ZEND_FFI_FLAG_PERSISTENT); in zend_ffi_cdata_dtor()
2448 zend_ffi_cdata *cdata = (zend_ffi_cdata*)object; in zend_ffi_cdata_free_obj() local
2450 zend_ffi_cdata_dtor(cdata); in zend_ffi_cdata_free_obj()
2496 zend_ffi_cdata *cdata; in zend_ffi_read_var() local
2505 cdata = emalloc(sizeof(zend_ffi_cdata)); in zend_ffi_read_var()
2506 zend_ffi_object_init(&cdata->std, zend_ffi_cdata_ce); in zend_ffi_read_var()
2507 cdata->type = ZEND_FFI_TYPE_MAKE_OWNED(new_type); in zend_ffi_read_var()
2508 cdata->flags = ZEND_FFI_FLAG_CONST; in zend_ffi_read_var()
2509 cdata->ptr_holder = sym->addr; in zend_ffi_read_var()
2510 cdata->ptr = &cdata->ptr_holder; in zend_ffi_read_var()
2511 ZVAL_OBJ(rv, &cdata->std); in zend_ffi_read_var()
2625 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(arg); in zend_ffi_pass_arg() local
2627 if (zend_ffi_is_compatible_type(type, ZEND_FFI_TYPE(cdata->type))) { in zend_ffi_pass_arg()
2628 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_pass_arg()
2629 if (!cdata->ptr) { in zend_ffi_pass_arg()
2633 *(void**)arg_values[n] = *(void**)cdata->ptr; in zend_ffi_pass_arg()
2635 *(void**)arg_values[n] = cdata->ptr; in zend_ffi_pass_arg()
2671 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(arg); in zend_ffi_pass_arg() local
2673 if (zend_ffi_is_compatible_type(type, ZEND_FFI_TYPE(cdata->type))) { in zend_ffi_pass_arg()
2675 arg_values[n] = cdata->ptr; in zend_ffi_pass_arg()
2724 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(arg); in zend_ffi_pass_var_arg() local
2725 zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); in zend_ffi_pass_var_arg()
3765 zend_ffi_cdata *cdata; in ZEND_METHOD() local
3870 cdata = (zend_ffi_cdata*)zend_ffi_cdata_new(zend_ffi_cdata_ce); in ZEND_METHOD()
3872 cdata->std.handlers = &zend_ffi_cdata_value_handlers; in ZEND_METHOD()
3874 cdata->type = type_ptr; in ZEND_METHOD()
3875 cdata->ptr = ptr; in ZEND_METHOD()
3876 cdata->flags = flags; in ZEND_METHOD()
3878 cdata->flags |= ZEND_FFI_FLAG_CONST; in ZEND_METHOD()
3881 RETURN_OBJ(&cdata->std); in ZEND_METHOD()
3888 zend_ffi_cdata *cdata; in ZEND_METHOD() local
3895 cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD()
3897 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
3898 if (!cdata->ptr) { in ZEND_METHOD()
3902 if (cdata->ptr != (void*)&cdata->ptr_holder) { in ZEND_METHOD()
3903 pefree(*(void**)cdata->ptr, cdata->flags & ZEND_FFI_FLAG_PERSISTENT); in ZEND_METHOD()
3905 …pefree(cdata->ptr_holder, (cdata->flags & ZEND_FFI_FLAG_PERSISTENT) || !is_zend_ptr(cdata->ptr_hol… in ZEND_METHOD()
3907 *(void**)cdata->ptr = NULL; in ZEND_METHOD()
3908 } else if (!(cdata->flags & ZEND_FFI_FLAG_OWNED)) { in ZEND_METHOD()
3909 pefree(cdata->ptr, cdata->flags & ZEND_FFI_FLAG_PERSISTENT); in ZEND_METHOD()
3910 cdata->ptr = NULL; in ZEND_METHOD()
3911 cdata->flags &= ~(ZEND_FFI_FLAG_OWNED|ZEND_FFI_FLAG_PERSISTENT); in ZEND_METHOD()
3912 cdata->std.handlers = &zend_ffi_cdata_free_handlers; in ZEND_METHOD()
3924 zend_ffi_cdata *old_cdata, *cdata; in ZEND_METHOD() local
4014 cdata = (zend_ffi_cdata*)zend_ffi_cdata_new(zend_ffi_cdata_ce); in ZEND_METHOD()
4015 cdata->std.handlers = &zend_ffi_cdata_value_handlers; in ZEND_METHOD()
4016 cdata->type = type_ptr; in ZEND_METHOD()
4017 cdata->ptr = emalloc(type->size); in ZEND_METHOD()
4018 zend_ffi_zval_to_cdata(cdata->ptr, type, zv); in ZEND_METHOD()
4019 cdata->flags = ZEND_FFI_FLAG_OWNED; in ZEND_METHOD()
4021 cdata->flags |= ZEND_FFI_FLAG_CONST; in ZEND_METHOD()
4023 RETURN_OBJ(&cdata->std); in ZEND_METHOD()
4026 cdata = (zend_ffi_cdata*)zend_ffi_cdata_new(zend_ffi_cdata_ce); in ZEND_METHOD()
4027 cdata->type = type_ptr; in ZEND_METHOD()
4028 cdata->ptr = &cdata->ptr_holder; in ZEND_METHOD()
4029 cdata->ptr_holder = (void*)(intptr_t)Z_LVAL_P(zv); in ZEND_METHOD()
4031 cdata->flags |= ZEND_FFI_FLAG_CONST; in ZEND_METHOD()
4033 RETURN_OBJ(&cdata->std); in ZEND_METHOD()
4036 cdata = (zend_ffi_cdata*)zend_ffi_cdata_new(zend_ffi_cdata_ce); in ZEND_METHOD()
4037 cdata->type = type_ptr; in ZEND_METHOD()
4038 cdata->ptr = &cdata->ptr_holder; in ZEND_METHOD()
4039 cdata->ptr_holder = NULL; in ZEND_METHOD()
4041 cdata->flags |= ZEND_FFI_FLAG_CONST; in ZEND_METHOD()
4043 RETURN_OBJ(&cdata->std); in ZEND_METHOD()
4054 cdata = (zend_ffi_cdata*)zend_ffi_cdata_new(zend_ffi_cdata_ce); in ZEND_METHOD()
4056 cdata->std.handlers = &zend_ffi_cdata_value_handlers; in ZEND_METHOD()
4058 cdata->type = type_ptr; in ZEND_METHOD()
4064 cdata->ptr = *(void**)ptr; in ZEND_METHOD()
4067 …TYPE(old_type->array.type), ZEND_FFI_TYPE(type->pointer.type))) { cdata->ptr = &cdata->ptr_holder; in ZEND_METHOD()
4068 cdata->ptr = &cdata->ptr_holder; in ZEND_METHOD()
4069 cdata->ptr_holder = old_cdata->ptr; in ZEND_METHOD()
4073 cdata->ptr = old_cdata->ptr_holder; in ZEND_METHOD()
4075 zend_object_release(&cdata->std); in ZEND_METHOD()
4079 cdata->ptr = ptr; in ZEND_METHOD()
4081 cdata->ptr = &cdata->ptr_holder; in ZEND_METHOD()
4082 cdata->ptr_holder = old_cdata->ptr_holder; in ZEND_METHOD()
4085 cdata->flags |= ZEND_FFI_FLAG_CONST; in ZEND_METHOD()
4092 cdata->flags |= ZEND_FFI_FLAG_OWNED; in ZEND_METHOD()
4098 RETURN_OBJ(&cdata->std); in ZEND_METHOD()
4181 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD() local
4183 type = cdata->type; in ZEND_METHOD()
4187 if (GC_REFCOUNT(&cdata->std) == 1 && Z_REFCOUNT_P(arg) == 1) { in ZEND_METHOD()
4189 cdata->type = type; in ZEND_METHOD()
4192 cdata->type = type = zend_ffi_remember_type(type); in ZEND_METHOD()
4290 zend_ffi_cdata *cdata, *new_cdata; in ZEND_METHOD() local
4305 cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD()
4306 type = ZEND_FFI_TYPE(cdata->type); in ZEND_METHOD()
4308 if (GC_REFCOUNT(&cdata->std) == 1 && Z_REFCOUNT_P(arg) == 1 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4309 && cdata->ptr == &cdata->ptr_holder) { in ZEND_METHOD()
4324 new_cdata->ptr_holder = cdata->ptr; in ZEND_METHOD()
4327 if (GC_REFCOUNT(&cdata->std) == 1 && Z_REFCOUNT_P(arg) == 1) { in ZEND_METHOD()
4328 if (ZEND_FFI_TYPE_IS_OWNED(cdata->type)) { in ZEND_METHOD()
4330 cdata->type = type; in ZEND_METHOD()
4333 if (cdata->flags & ZEND_FFI_FLAG_OWNED) { in ZEND_METHOD()
4335 cdata->flags &= ~ZEND_FFI_FLAG_OWNED; in ZEND_METHOD()
4356 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD() local
4357 type = ZEND_FFI_TYPE(cdata->type); in ZEND_METHOD()
4382 zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD() local
4383 type = ZEND_FFI_TYPE(cdata->type); in ZEND_METHOD()
4529 zend_ffi_cdata *cdata; in ZEND_METHOD() local
4541 cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD()
4542 type = ZEND_FFI_TYPE(cdata->type); in ZEND_METHOD()
4544 ptr = *(void**)cdata->ptr; in ZEND_METHOD()
4546 ptr = cdata->ptr; in ZEND_METHOD()
4560 zend_ffi_cdata *cdata; in ZEND_METHOD() local
4573 cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD()
4574 type = ZEND_FFI_TYPE(cdata->type); in ZEND_METHOD()
4577 ptr = *(void**)cdata->ptr; in ZEND_METHOD()
4579 ptr = cdata->ptr; in ZEND_METHOD()
4588 ptr = *(void**)cdata->ptr; in ZEND_METHOD()
4590 ptr = cdata->ptr; in ZEND_METHOD()
4603 zend_ffi_cdata *cdata; in ZEND_METHOD() local
4617 cdata = (zend_ffi_cdata*)Z_OBJ_P(zv); in ZEND_METHOD()
4618 type = ZEND_FFI_TYPE(cdata->type); in ZEND_METHOD()
4625 RETURN_BOOL(*(void**)cdata->ptr == NULL); in ZEND_METHOD()