Lines Matching refs:kind

73 	zend_ffi_tag_kind      kind;  member
110 zend_ffi_type_kind kind; member
117 zend_ffi_type_kind kind; member
155 zend_ffi_symbol_kind kind; member
278 ZEND_ASSERT(dst_type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_func_ptr_are_compatible()
279 ZEND_ASSERT(src_type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_func_ptr_are_compatible()
321 } else if (dst_type->kind == src_type->kind) { in zend_ffi_is_compatible_type()
322 if (dst_type->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_compatible_type()
324 } else if (dst_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_compatible_type()
327 if (dst_type->kind == ZEND_FFI_TYPE_VOID || in zend_ffi_is_compatible_type()
328 src_type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_compatible_type()
330 } else if (dst_type->kind == ZEND_FFI_TYPE_FUNC && in zend_ffi_is_compatible_type()
331 src_type->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_is_compatible_type()
334 } else if (dst_type->kind == ZEND_FFI_TYPE_ARRAY && in zend_ffi_is_compatible_type()
342 } else if (dst_type->kind == ZEND_FFI_TYPE_POINTER && in zend_ffi_is_compatible_type()
343 src_type->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_is_compatible_type()
346 if (dst_type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_compatible_type()
362 switch (ZEND_FFI_TYPE(field->type)->kind) { in zend_ffi_face_struct_add_fields()
443 zend_ffi_type_kind kind = type->kind; in zend_ffi_get_type() local
446 switch (kind) { in zend_ffi_get_type()
480 kind = type->enumeration.kind; in zend_ffi_get_type()
497 (type->kind < ZEND_FFI_TYPE_POINTER) ? in zend_ffi_cdata_to_zval_slow()
526 (type->kind < ZEND_FFI_TYPE_POINTER) ? in zend_ffi_cdata_to_zval_slow_ret()
531 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_to_zval_slow_ret()
534 } else if (type->kind == ZEND_FFI_TYPE_STRUCT) { in zend_ffi_cdata_to_zval_slow_ret()
548 zend_ffi_type_kind kind = type->kind; in zend_ffi_cdata_to_zval() local
551 switch (kind) { in zend_ffi_cdata_to_zval()
594 kind = type->enumeration.kind; in zend_ffi_cdata_to_zval()
603 …} else if ((type->attr & ZEND_FFI_ATTR_CONST) && ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_F… in zend_ffi_cdata_to_zval()
681 if (ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_CHAR in zend_ffi_bit_field_to_zval()
682 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT8 in zend_ffi_bit_field_to_zval()
683 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT16 in zend_ffi_bit_field_to_zval()
684 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT32 in zend_ffi_bit_field_to_zval()
685 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT64) { in zend_ffi_bit_field_to_zval()
743 zend_ffi_type_kind kind = type->kind; in zend_ffi_zval_to_cdata() local
746 …if (kind != ZEND_FFI_TYPE_POINTER && Z_TYPE_P(value) == IS_OBJECT && Z_OBJCE_P(value) == zend_ffi_… in zend_ffi_zval_to_cdata()
756 switch (kind) { in zend_ffi_zval_to_cdata()
818 kind = type->enumeration.kind; in zend_ffi_zval_to_cdata()
828 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_zval_to_cdata()
839 } else if (ZEND_FFI_TYPE(cdata->type)->kind != ZEND_FFI_TYPE_POINTER in zend_ffi_zval_to_cdata()
849 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_zval_to_cdata()
987 if (ret_type->kind != ZEND_FFI_TYPE_VOID) { in zend_ffi_callback_trampoline()
992 && ret_type->kind >= ZEND_FFI_TYPE_UINT8 in zend_ffi_callback_trampoline()
993 && ret_type->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_callback_trampoline()
1175 zend_ffi_type_kind kind = ctype->kind; in zend_ffi_cdata_cast_object() local
1178 switch (kind) { in zend_ffi_cdata_cast_object()
1221 kind = ctype->enumeration.kind; in zend_ffi_cdata_cast_object()
1227 …} else if ((ctype->attr & ZEND_FFI_ATTR_CONST) && ZEND_FFI_TYPE(ctype->pointer.type)->kind == ZEND… in zend_ffi_cdata_cast_object()
1256 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1259 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_read_field()
1260 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_read_field()
1278 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1305 && field_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1333 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1336 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_write_field()
1337 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_write_field()
1355 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1402 if (EXPECTED(type->kind == ZEND_FFI_TYPE_ARRAY)) { in zend_ffi_cdata_read_dim()
1415 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_dim()
1426 } else if (EXPECTED(type->kind == ZEND_FFI_TYPE_POINTER)) { in zend_ffi_cdata_read_dim()
1432 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_dim()
1465 if (EXPECTED(type->kind == ZEND_FFI_TYPE_ARRAY)) { in zend_ffi_cdata_write_dim()
1481 } else if (EXPECTED(type->kind == ZEND_FFI_TYPE_POINTER)) { in zend_ffi_cdata_write_dim()
1538 switch (type->kind) { in zend_ffi_ctype_name()
1677 if (type->kind == ZEND_FFI_TYPE_STRUCT) { in zend_ffi_return_unsupported()
1679 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_return_unsupported()
1690 if (type->kind == ZEND_FFI_TYPE_STRUCT) { in zend_ffi_pass_unsupported()
1692 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_pass_unsupported()
1785 if (type1->kind == ZEND_FFI_TYPE_POINTER && type2->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_compare_objects()
1806 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_count_elements()
1823 if (base_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_add()
1841 new_type->kind = ZEND_FFI_TYPE_POINTER; in zend_ffi_add()
1882 if (type1->kind == ZEND_FFI_TYPE_POINTER || type1->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_do_operation()
1895 if (type2->kind == ZEND_FFI_TYPE_POINTER || type2->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_do_operation()
1899 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_do_operation()
1906 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_do_operation()
1932 if (type2->kind == ZEND_FFI_TYPE_POINTER || type2->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_do_operation()
1985 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_it_get_current_data()
2035 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_get_iterator()
2071 switch (type->kind) { in zend_ffi_cdata_get_debug_info()
2103 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_cdata_get_debug_info()
2162 if (type->kind != ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_get_closure()
2169 if (type->kind != ZEND_FFI_TYPE_FUNC) { in zend_ffi_cdata_get_closure()
2245 } else if (type1->kind == type2->kind) { in zend_ffi_is_same_type()
2246 if (type1->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_same_type()
2248 } else if (type1->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_same_type()
2251 if (type1->kind == ZEND_FFI_TYPE_VOID || in zend_ffi_is_same_type()
2252 type2->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_same_type()
2255 } else if (type1->kind == ZEND_FFI_TYPE_ARRAY && in zend_ffi_is_same_type()
2325 switch (type->kind) { in _zend_ffi_type_dtor()
2488 if (type->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_clone_obj()
2507 …if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST && sym->kind != ZEND_F… in zend_ffi_read_var()
2516 if (sym->kind == ZEND_FFI_SYM_VAR) { in zend_ffi_read_var()
2518 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in zend_ffi_read_var()
2522 new_type->kind = ZEND_FFI_TYPE_POINTER; in zend_ffi_read_var()
2550 if (sym && sym->kind != ZEND_FFI_SYM_VAR) { in zend_ffi_write_var()
2574 zend_ffi_type_kind kind = type->kind; in zend_ffi_pass_arg() local
2579 switch (kind) { in zend_ffi_pass_arg()
2643 && ((ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_CHAR) in zend_ffi_pass_arg()
2644 || (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_VOID))) { in zend_ffi_pass_arg()
2651 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_pass_arg()
2663 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_pass_arg()
2690 kind = type->enumeration.kind; in zend_ffi_pass_arg()
2776 ZEND_ASSERT(type->kind == ZEND_FFI_TYPE_FUNC); in ZEND_FUNCTION()
2879 if (ZEND_FFI_TYPE(type->func.ret_type)->kind != ZEND_FFI_TYPE_VOID) { in ZEND_FUNCTION()
2884 && func_ret_type->kind >= ZEND_FFI_TYPE_UINT8 in ZEND_FUNCTION()
2885 && func_ret_type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_FUNCTION()
2947 if (sym && sym->kind != ZEND_FFI_SYM_FUNC) { in zend_ffi_get_func()
2957 ZEND_ASSERT(type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_get_func()
3090 if (sym->kind == ZEND_FFI_SYM_VAR) { in ZEND_METHOD()
3097 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in ZEND_METHOD()
3130 if (old->kind != type->kind in zend_ffi_same_types()
3137 switch (old->kind) { in zend_ffi_same_types()
3139 return old->enumeration.kind == type->enumeration.kind; in zend_ffi_same_types()
3208 if (old->kind != sym->kind || old->is_const != sym->is_const) { in zend_ffi_same_symbols()
3212 if (old->kind == ZEND_FFI_SYM_CONST) { in zend_ffi_same_symbols()
3224 if (old->kind != tag->kind) { in zend_ffi_same_tags()
3242 switch (dcl_type->kind) { in zend_ffi_subst_old_type()
3424 if (sym->kind == ZEND_FFI_SYM_VAR) { in zend_ffi_load()
3438 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in zend_ffi_load()
3493 …ading '%s', redefinition of '%s %s'", filename, zend_ffi_tag_kind_name[tag->kind], ZSTR_VAL(name)); in zend_ffi_load()
3686 if (type->kind == ZEND_FFI_TYPE_ENUM) { in zend_ffi_validate_incomplete_type()
3723 if (type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_validate_type()
3733 if (type->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_validate_var_type()
3761 switch (dcl_type->kind) { in zend_ffi_subst_type()
3919 if (type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
3945 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4060 if (type->kind < ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) < IS_STRING) { in ZEND_METHOD()
4072 } else if (type->kind == ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) == IS_LONG) { in ZEND_METHOD()
4082 } else if (type->kind == ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) == IS_NULL) { in ZEND_METHOD()
4103 if (type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4108 if (old_type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4109 && type->kind != ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4110 && ZEND_FFI_TYPE(old_type->pointer.type)->kind == ZEND_FFI_TYPE_VOID) { in ZEND_METHOD()
4113 } else if (old_type->kind == ZEND_FFI_TYPE_ARRAY in ZEND_METHOD()
4114 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4118 } else if (old_type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4119 && type->kind == ZEND_FFI_TYPE_ARRAY in ZEND_METHOD()
4273 if (type->kind == ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4276 } else if (type->kind == ZEND_FFI_TYPE_ARRAY && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) { in ZEND_METHOD()
4279 } else if (type->kind == ZEND_FFI_TYPE_VOID) { in ZEND_METHOD()
4307 …} else if (ZEND_FFI_TYPE(type)->kind == ZEND_FFI_TYPE_ARRAY && (ZEND_FFI_TYPE(type)->attr & ZEND_F… in ZEND_METHOD()
4314 new_type->kind = ZEND_FFI_TYPE_ARRAY; in ZEND_METHOD()
4356 if (GC_REFCOUNT(&cdata->std) == 1 && Z_REFCOUNT_P(arg) == 1 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4363 new_type->kind = ZEND_FFI_TYPE_POINTER; in ZEND_METHOD()
4461 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4465 if (type1->kind != ZEND_FFI_TYPE_POINTER && size > type1->size) { in ZEND_METHOD()
4481 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4485 if (type2->kind != ZEND_FFI_TYPE_POINTER && size > type2->size) { in ZEND_METHOD()
4525 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4529 if (type1->kind != ZEND_FFI_TYPE_POINTER && size > type1->size) { in ZEND_METHOD()
4549 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4553 if (type2->kind != ZEND_FFI_TYPE_POINTER && size > type2->size) { in ZEND_METHOD()
4591 if (type->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4595 if (type->kind != ZEND_FFI_TYPE_POINTER && size > type->size) { in ZEND_METHOD()
4624 if (type->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4628 if (type->kind != ZEND_FFI_TYPE_POINTER && size > type->size) { in ZEND_METHOD()
4635 …if (type->kind == ZEND_FFI_TYPE_POINTER && ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYP… in ZEND_METHOD()
4637 …} else if (type->kind == ZEND_FFI_TYPE_ARRAY && ZEND_FFI_TYPE(type->array.type)->kind == ZEND_FFI_… in ZEND_METHOD()
4668 if (type->kind != ZEND_FFI_TYPE_POINTER){ in ZEND_METHOD()
4708 RETURN_LONG(type->kind); in ZEND_METHOD()
4764 if (type->kind != ZEND_FFI_TYPE_ENUM) { in ZEND_METHOD()
4768 RETURN_LONG(type->enumeration.kind); in ZEND_METHOD()
4783 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in ZEND_METHOD()
4804 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in ZEND_METHOD()
4823 if (type->kind != ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4847 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4873 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4900 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4927 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4946 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4967 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4987 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
5641 static const zend_ffi_type zend_ffi_type_void = {.kind=ZEND_FFI_TYPE_VOID, .size=1, .align=1};
5642 static const zend_ffi_type zend_ffi_type_char = {.kind=ZEND_FFI_TYPE_CHAR, .size=1, .align=_Alignof…
5643 static const zend_ffi_type zend_ffi_type_bool = {.kind=ZEND_FFI_TYPE_BOOL, .size=1, .align=_Alignof…
5644 static const zend_ffi_type zend_ffi_type_sint8 = {.kind=ZEND_FFI_TYPE_SINT8, .size=1, .align=_Align…
5645 static const zend_ffi_type zend_ffi_type_uint8 = {.kind=ZEND_FFI_TYPE_UINT8, .size=1, .align=_Align…
5646 static const zend_ffi_type zend_ffi_type_sint16 = {.kind=ZEND_FFI_TYPE_SINT16, .size=2, .align=_Ali…
5647 static const zend_ffi_type zend_ffi_type_uint16 = {.kind=ZEND_FFI_TYPE_UINT16, .size=2, .align=_Ali…
5648 static const zend_ffi_type zend_ffi_type_sint32 = {.kind=ZEND_FFI_TYPE_SINT32, .size=4, .align=_Ali…
5649 static const zend_ffi_type zend_ffi_type_uint32 = {.kind=ZEND_FFI_TYPE_UINT32, .size=4, .align=_Ali…
5650 static const zend_ffi_type zend_ffi_type_sint64 = {.kind=ZEND_FFI_TYPE_SINT64, .size=8, .align=_Ali…
5651 static const zend_ffi_type zend_ffi_type_uint64 = {.kind=ZEND_FFI_TYPE_UINT64, .size=8, .align=_Ali…
5652 static const zend_ffi_type zend_ffi_type_float = {.kind=ZEND_FFI_TYPE_FLOAT, .size=sizeof(float), .…
5653 static const zend_ffi_type zend_ffi_type_double = {.kind=ZEND_FFI_TYPE_DOUBLE, .size=sizeof(double)…
5656 static const zend_ffi_type zend_ffi_type_long_double = {.kind=ZEND_FFI_TYPE_LONGDOUBLE, .size=sizeo…
5659 static const zend_ffi_type zend_ffi_type_ptr = {.kind=ZEND_FFI_TYPE_POINTER, .size=sizeof(void*), .…
5880 return (sym->kind == ZEND_FFI_SYM_TYPE);
5898 if (sym && sym->kind == ZEND_FFI_SYM_TYPE) {
5920 val->kind = ZEND_FFI_VAL_NAME;
5926 if (sym && sym->kind == ZEND_FFI_SYM_CONST) {
5928 switch (sym->type->kind) {
5932 val->kind = ZEND_FFI_VAL_INT32;
5935 val->kind = ZEND_FFI_VAL_INT64;
5940 val->kind = ZEND_FFI_VAL_UINT32;
5943 val->kind = ZEND_FFI_VAL_UINT64;
5951 val->kind = ZEND_FFI_VAL_ERROR;
5958 type->kind = ZEND_FFI_TYPE_ENUM;
5964 type->enumeration.kind = ZEND_FFI_TYPE_UINT8;
5968 type->enumeration.kind = ZEND_FFI_TYPE_UINT32;
5983 (enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT8 ||
5984 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT16 ||
5985 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT32 ||
5986 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT64);
5988 ZEND_ASSERT(enum_type && enum_type->kind == ZEND_FFI_TYPE_ENUM);
5989 if (val->kind == ZEND_FFI_VAL_EMPTY) {
6001 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
6010 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
6019 } else if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
6063 enum_type->enumeration.kind = sym_type->kind;
6077 sym->kind = ZEND_FFI_SYM_CONST;
6088 type->kind = ZEND_FFI_TYPE_STRUCT;
6143 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6188 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6191 if (field_type->kind != ZEND_FFI_TYPE_STRUCT) {
6255 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6263 if (field_type->kind < ZEND_FFI_TYPE_UINT8 || field_type->kind > ZEND_FFI_TYPE_BOOL) {
6268 if (bits->kind == ZEND_FFI_VAL_INT32 || bits->kind == ZEND_FFI_VAL_INT64) {
6282 } else if (bits->kind == ZEND_FFI_VAL_UINT32 || bits->kind == ZEND_FFI_VAL_UINT64) {
6355 ZEND_ASSERT(struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6369 type->kind = ZEND_FFI_TYPE_POINTER;
6388 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6391 } else if (type->kind == ZEND_FFI_TYPE_ARRAY && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) {
6408 if (len->kind == ZEND_FFI_VAL_EMPTY) {
6410 } else if (len->kind == ZEND_FFI_VAL_UINT32 || len->kind == ZEND_FFI_VAL_UINT64) {
6412 } else if (len->kind == ZEND_FFI_VAL_INT32 || len->kind == ZEND_FFI_VAL_INT64) {
6414 } else if (len->kind == ZEND_FFI_VAL_CHAR) {
6433 type->kind = ZEND_FFI_TYPE_ARRAY;
6448 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6451 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) {
6473 if (arg_type->kind == ZEND_FFI_TYPE_VOID) {
6501 …if (i >= 4 && i <= 5 && (arg_type->kind == ZEND_FFI_TYPE_FLOAT || arg_type->kind == ZEND_FFI_TYPE_…
6503 if (i < 6 && (arg_type->kind == ZEND_FFI_TYPE_FLOAT || arg_type->kind == ZEND_FFI_TYPE_DOUBLE)) {
6527 type->kind = ZEND_FFI_TYPE_FUNC;
6607 if (type->kind == ZEND_FFI_TYPE_ARRAY) {
6609 type->kind = ZEND_FFI_TYPE_POINTER;
6613 new_type->kind = ZEND_FFI_TYPE_POINTER;
6620 } else if (type->kind == ZEND_FFI_TYPE_FUNC) {
6622 new_type->kind = ZEND_FFI_TYPE_POINTER;
6652 && sym->kind == ZEND_FFI_SYM_TYPE
6662 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6663 if (sym->kind == ZEND_FFI_SYM_FUNC
6670 if (sym->kind == ZEND_FFI_SYM_VAR
6699 sym->kind = ZEND_FFI_SYM_TYPE;
6715 sym->kind = (type->kind == ZEND_FFI_TYPE_FUNC) ? ZEND_FFI_SYM_FUNC : ZEND_FFI_SYM_VAR;
6743 if (tag->kind != ZEND_FFI_TAG_STRUCT) {
6751 if (tag->kind != ZEND_FFI_TAG_UNION) {
6759 if (tag->kind != ZEND_FFI_TAG_ENUM) {
6779 tag->kind = ZEND_FFI_TAG_STRUCT;
6784 tag->kind = ZEND_FFI_TAG_UNION;
6789 tag->kind = ZEND_FFI_TAG_ENUM;
6957 …&& (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_V…
6966 …&& (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_V…
6975 && (val->kind == ZEND_FFI_VAL_NAME)) {
7042 …if ((val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_…
7057 switch (nested_type->kind) {
7123 switch (align_val->kind) {
7154 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7155 val->kind = ZEND_FFI_VAL_INT32; \
7157 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7158 val->kind = ZEND_FFI_VAL_INT32; \
7160 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7161 val->kind = ZEND_FFI_VAL_INT32; \
7163 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7164 val->kind = ZEND_FFI_VAL_INT32; \
7167 val->kind = ZEND_FFI_VAL_ERROR; \
7172 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7173 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7174 val->kind = MAX(val->kind, op2->kind); \
7176 } else if (op2->kind == ZEND_FFI_VAL_INT32) { \
7178 } else if (op2->kind == ZEND_FFI_VAL_INT64) { \
7180 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7181 val->kind = op2->kind; \
7183 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7186 val->kind = ZEND_FFI_VAL_ERROR; \
7188 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7189 if (op2->kind == ZEND_FFI_VAL_UINT32) { \
7191 } else if (op2->kind == ZEND_FFI_VAL_UINT64) { \
7193 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7194 val->kind = MAX(val->kind, op2->kind); \
7196 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7197 val->kind = op2->kind; \
7199 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7202 val->kind = ZEND_FFI_VAL_ERROR; \
7204 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7205 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7207 } else if (op2->kind == ZEND_FFI_VAL_INT32 ||op2->kind == ZEND_FFI_VAL_INT64) { \
7209 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7210 val->kind = MAX(val->kind, op2->kind); \
7212 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7215 val->kind = ZEND_FFI_VAL_ERROR; \
7217 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7218 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7219 val->kind = op2->kind; \
7221 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7222 val->kind = ZEND_FFI_VAL_INT64; \
7224 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7225 val->kind = op2->kind; \
7227 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7230 val->kind = ZEND_FFI_VAL_ERROR; \
7233 val->kind = ZEND_FFI_VAL_ERROR; \
7238 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7239 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7240 val->kind = MAX(val->kind, op2->kind); \
7242 } else if (op2->kind == ZEND_FFI_VAL_INT32) { \
7244 } else if (op2->kind == ZEND_FFI_VAL_INT64) { \
7246 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7248 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7251 val->kind = ZEND_FFI_VAL_ERROR; \
7253 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7254 if (op2->kind == ZEND_FFI_VAL_UINT32) { \
7256 } else if (op2->kind == ZEND_FFI_VAL_UINT64) { \
7258 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7259 val->kind = MAX(val->kind, op2->kind); \
7261 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7263 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7266 val->kind = ZEND_FFI_VAL_ERROR; \
7268 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7269 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7270 val->kind = op2->kind; \
7272 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7273 val->kind = op2->kind; \
7276 val->kind = ZEND_FFI_VAL_ERROR; \
7278 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7279 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7280 val->kind = op2->kind; \
7282 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7283 val->kind = op2->kind; \
7285 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7288 val->kind = ZEND_FFI_VAL_ERROR; \
7291 val->kind = ZEND_FFI_VAL_ERROR; \
7296 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7297 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7298 val->kind = ZEND_FFI_VAL_INT32; \
7300 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7301 val->kind = ZEND_FFI_VAL_INT32; \
7303 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7304 val->kind = ZEND_FFI_VAL_INT32; \
7306 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7307 val->kind = ZEND_FFI_VAL_INT32; \
7310 val->kind = ZEND_FFI_VAL_ERROR; \
7312 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7313 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7314 val->kind = ZEND_FFI_VAL_INT32; \
7316 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7317 val->kind = ZEND_FFI_VAL_INT32; \
7319 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7320 val->kind = ZEND_FFI_VAL_INT32; \
7322 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7323 val->kind = ZEND_FFI_VAL_INT32; \
7326 val->kind = ZEND_FFI_VAL_ERROR; \
7328 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7329 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7330 val->kind = ZEND_FFI_VAL_INT32; \
7332 } else if (op2->kind == ZEND_FFI_VAL_INT32 ||op2->kind == ZEND_FFI_VAL_INT64) { \
7333 val->kind = ZEND_FFI_VAL_INT32; \
7335 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7336 val->kind = ZEND_FFI_VAL_INT32; \
7338 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7339 val->kind = ZEND_FFI_VAL_INT32; \
7342 val->kind = ZEND_FFI_VAL_ERROR; \
7344 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7345 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7346 val->kind = ZEND_FFI_VAL_INT32; \
7348 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7349 val->kind = ZEND_FFI_VAL_INT32; \
7351 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7352 val->kind = ZEND_FFI_VAL_INT32; \
7354 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7355 val->kind = ZEND_FFI_VAL_INT32; \
7358 val->kind = ZEND_FFI_VAL_ERROR; \
7361 val->kind = ZEND_FFI_VAL_ERROR; \
7368 if (val->kind == ZEND_FFI_VAL_INT32) {
7382 if (val->kind == ZEND_FFI_VAL_INT32 && op2->kind == ZEND_FFI_VAL_INT32) {
7385 val->kind = ZEND_FFI_VAL_ERROR;
7394 if (val->kind == ZEND_FFI_VAL_INT32 && op2->kind == ZEND_FFI_VAL_INT32) {
7397 val->kind = ZEND_FFI_VAL_ERROR;
7501 switch (ZEND_FFI_TYPE(dcl->type)->kind) {
7503 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7504 val->kind = ZEND_FFI_VAL_FLOAT;
7506 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7507 val->kind = ZEND_FFI_VAL_FLOAT;
7509 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7510 val->kind = ZEND_FFI_VAL_FLOAT;
7511 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7512 val->kind = ZEND_FFI_VAL_FLOAT;
7515 val->kind = ZEND_FFI_VAL_ERROR;
7519 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7520 val->kind = ZEND_FFI_VAL_DOUBLE;
7522 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7523 val->kind = ZEND_FFI_VAL_DOUBLE;
7525 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7526 val->kind = ZEND_FFI_VAL_DOUBLE;
7527 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7528 val->kind = ZEND_FFI_VAL_DOUBLE;
7531 val->kind = ZEND_FFI_VAL_ERROR;
7536 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7537 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7539 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7540 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7542 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7543 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7544 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7545 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7548 val->kind = ZEND_FFI_VAL_ERROR;
7556 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7557 val->kind = ZEND_FFI_VAL_UINT32;
7558 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7559 val->kind = ZEND_FFI_VAL_UINT32;
7561 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7562 val->kind = ZEND_FFI_VAL_UINT32;
7565 val->kind = ZEND_FFI_VAL_ERROR;
7571 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7572 val->kind = ZEND_FFI_VAL_INT32;
7573 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7574 val->kind = ZEND_FFI_VAL_INT32;
7576 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7577 val->kind = ZEND_FFI_VAL_INT32;
7580 val->kind = ZEND_FFI_VAL_ERROR;
7584 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7585 val->kind = ZEND_FFI_VAL_UINT64;
7586 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7587 val->kind = ZEND_FFI_VAL_UINT64;
7589 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7590 val->kind = ZEND_FFI_VAL_UINT64;
7593 val->kind = ZEND_FFI_VAL_ERROR;
7597 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7598 val->kind = ZEND_FFI_VAL_CHAR;
7600 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7601 val->kind = ZEND_FFI_VAL_CHAR;
7603 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7604 val->kind = ZEND_FFI_VAL_CHAR;
7606 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7608 val->kind = ZEND_FFI_VAL_ERROR;
7612 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7613 val->kind = ZEND_FFI_VAL_UINT32;
7614 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7615 val->kind = ZEND_FFI_VAL_UINT32;
7617 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7618 val->kind = ZEND_FFI_VAL_UINT32;
7621 val->kind = ZEND_FFI_VAL_ERROR;
7625 val->kind = ZEND_FFI_VAL_ERROR;
7634 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7635 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7636 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7637 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7639 val->kind = ZEND_FFI_VAL_ERROR;
7646 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7648 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7650 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7652 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7655 val->kind = ZEND_FFI_VAL_ERROR;
7662 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7664 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7666 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7669 val->kind = ZEND_FFI_VAL_ERROR;
7677 if (val->kind == ZEND_FFI_VAL_INT32) {
7685 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_INT32) {
7686 val->kind = ZEND_FFI_VAL_UINT32;
7688 } else if (val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_VAL_INT64) {
7689 val->kind = ZEND_FFI_VAL_UINT32;
7691 } else if (val->kind == ZEND_FFI_VAL_FLOAT) {
7692 val->kind = ZEND_FFI_VAL_UINT32;
7694 } else if (val->kind == ZEND_FFI_VAL_DOUBLE) {
7695 val->kind = ZEND_FFI_VAL_UINT32;
7697 } else if (val->kind == ZEND_FFI_VAL_LONG_DOUBLE) {
7698 val->kind = ZEND_FFI_VAL_UINT32;
7704 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7705 val->kind = ZEND_FFI_VAL_UINT32;
7707 } else if (val->kind == ZEND_FFI_VAL_STRING) {
7710 val->kind = ZEND_FFI_VAL_ERROR;
7712 val->kind = ZEND_FFI_VAL_UINT32;
7716 val->kind = ZEND_FFI_VAL_ERROR;
7727 val->kind = (type->size > 0xffffffff) ? ZEND_FFI_VAL_UINT64 : ZEND_FFI_VAL_UINT32;
7735 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_INT32) {
7736 val->kind = ZEND_FFI_VAL_UINT32;
7738 } else if (val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_VAL_INT64) {
7739 val->kind = ZEND_FFI_VAL_UINT32;
7741 } else if (val->kind == ZEND_FFI_VAL_FLOAT) {
7742 val->kind = ZEND_FFI_VAL_UINT32;
7744 } else if (val->kind == ZEND_FFI_VAL_DOUBLE) {
7745 val->kind = ZEND_FFI_VAL_UINT32;
7748 } else if (val->kind == ZEND_FFI_VAL_LONG_DOUBLE) {
7749 val->kind = ZEND_FFI_VAL_UINT32;
7752 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7753 val->kind = ZEND_FFI_VAL_UINT32;
7755 } else if (val->kind == ZEND_FFI_VAL_STRING) {
7756 val->kind = ZEND_FFI_VAL_UINT32;
7759 val->kind = ZEND_FFI_VAL_ERROR;
7767 val->kind = ZEND_FFI_VAL_UINT32;
7800 val->kind = ZEND_FFI_VAL_UINT32;
7802 val->kind = (sizeof(long) == 4) ? ZEND_FFI_VAL_UINT32 : ZEND_FFI_VAL_UINT64;
7804 val->kind = ZEND_FFI_VAL_UINT64;
7809 val->kind = ZEND_FFI_VAL_INT32;
7811 val->kind = (sizeof(long) == 4) ? ZEND_FFI_VAL_INT32 : ZEND_FFI_VAL_INT64;
7813 val->kind = ZEND_FFI_VAL_INT64;
7823 val->kind = ZEND_FFI_VAL_FLOAT;
7825 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7827 val->kind = ZEND_FFI_VAL_DOUBLE;
7835 val->kind = ZEND_FFI_VAL_ERROR;
7837 val->kind = ZEND_FFI_VAL_STRING;
7849 val->kind = ZEND_FFI_VAL_ERROR;
7851 val->kind = ZEND_FFI_VAL_CHAR;
7875 val->kind = ZEND_FFI_VAL_ERROR;
7878 val->kind = ZEND_FFI_VAL_ERROR;
7883 val->kind = ZEND_FFI_VAL_ERROR;
7893 val->kind = ZEND_FFI_VAL_ERROR;
7903 val->kind = ZEND_FFI_VAL_ERROR;
7910 val->kind = ZEND_FFI_VAL_ERROR;
7913 val->kind = ZEND_FFI_VAL_ERROR;