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
277 ZEND_ASSERT(dst_type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_func_ptr_are_compatible()
278 ZEND_ASSERT(src_type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_func_ptr_are_compatible()
320 } else if (dst_type->kind == src_type->kind) { in zend_ffi_is_compatible_type()
321 if (dst_type->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_compatible_type()
323 } else if (dst_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_compatible_type()
326 if (dst_type->kind == ZEND_FFI_TYPE_VOID || in zend_ffi_is_compatible_type()
327 src_type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_compatible_type()
329 } else if (dst_type->kind == ZEND_FFI_TYPE_FUNC && in zend_ffi_is_compatible_type()
330 src_type->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_is_compatible_type()
333 } else if (dst_type->kind == ZEND_FFI_TYPE_ARRAY && in zend_ffi_is_compatible_type()
341 } else if (dst_type->kind == ZEND_FFI_TYPE_POINTER && in zend_ffi_is_compatible_type()
342 src_type->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_is_compatible_type()
345 if (dst_type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_compatible_type()
361 switch (ZEND_FFI_TYPE(field->type)->kind) { in zend_ffi_face_struct_add_fields()
442 zend_ffi_type_kind kind = type->kind; in zend_ffi_get_type() local
445 switch (kind) { in zend_ffi_get_type()
479 kind = type->enumeration.kind; in zend_ffi_get_type()
496 (type->kind < ZEND_FFI_TYPE_POINTER) ? in zend_ffi_cdata_to_zval_slow()
525 (type->kind < ZEND_FFI_TYPE_POINTER) ? in zend_ffi_cdata_to_zval_slow_ret()
530 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_to_zval_slow_ret()
533 } else if (type->kind == ZEND_FFI_TYPE_STRUCT) { in zend_ffi_cdata_to_zval_slow_ret()
547 zend_ffi_type_kind kind = type->kind; in zend_ffi_cdata_to_zval() local
550 switch (kind) { in zend_ffi_cdata_to_zval()
593 kind = type->enumeration.kind; in zend_ffi_cdata_to_zval()
602 …} else if ((type->attr & ZEND_FFI_ATTR_CONST) && ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_F… in zend_ffi_cdata_to_zval()
680 if (ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_CHAR in zend_ffi_bit_field_to_zval()
681 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT8 in zend_ffi_bit_field_to_zval()
682 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT16 in zend_ffi_bit_field_to_zval()
683 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT32 in zend_ffi_bit_field_to_zval()
684 || ZEND_FFI_TYPE(field->type)->kind == ZEND_FFI_TYPE_SINT64) { in zend_ffi_bit_field_to_zval()
742 zend_ffi_type_kind kind = type->kind; in zend_ffi_zval_to_cdata() local
745 …if (kind != ZEND_FFI_TYPE_POINTER && Z_TYPE_P(value) == IS_OBJECT && Z_OBJCE_P(value) == zend_ffi_… in zend_ffi_zval_to_cdata()
755 switch (kind) { in zend_ffi_zval_to_cdata()
816 kind = type->enumeration.kind; in zend_ffi_zval_to_cdata()
826 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { 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()
847 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_zval_to_cdata()
985 if (ret_type->kind != ZEND_FFI_TYPE_VOID) { in zend_ffi_callback_trampoline()
1152 zend_ffi_type_kind kind = ctype->kind; in zend_ffi_cdata_cast_object() local
1155 switch (kind) { in zend_ffi_cdata_cast_object()
1198 kind = ctype->enumeration.kind; in zend_ffi_cdata_cast_object()
1204 …} else if ((ctype->attr & ZEND_FFI_ATTR_CONST) && ZEND_FFI_TYPE(ctype->pointer.type)->kind == ZEND… in zend_ffi_cdata_cast_object()
1233 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1236 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_read_field()
1237 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_read_field()
1255 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1282 && field_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1310 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1313 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_write_field()
1314 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_write_field()
1332 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1379 if (EXPECTED(type->kind == ZEND_FFI_TYPE_ARRAY)) { in zend_ffi_cdata_read_dim()
1392 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_dim()
1403 } else if (EXPECTED(type->kind == ZEND_FFI_TYPE_POINTER)) { in zend_ffi_cdata_read_dim()
1409 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_dim()
1442 if (EXPECTED(type->kind == ZEND_FFI_TYPE_ARRAY)) { in zend_ffi_cdata_write_dim()
1458 } else if (EXPECTED(type->kind == ZEND_FFI_TYPE_POINTER)) { in zend_ffi_cdata_write_dim()
1516 switch (type->kind) { in zend_ffi_ctype_name()
1655 if (type->kind == ZEND_FFI_TYPE_STRUCT) { in zend_ffi_return_unsupported()
1657 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_return_unsupported()
1668 if (type->kind == ZEND_FFI_TYPE_STRUCT) { in zend_ffi_pass_unsupported()
1670 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_pass_unsupported()
1763 if (type1->kind == ZEND_FFI_TYPE_POINTER && type2->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_compare_objects()
1784 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_count_elements()
1801 if (base_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_add()
1819 new_type->kind = ZEND_FFI_TYPE_POINTER; in zend_ffi_add()
1860 if (type1->kind == ZEND_FFI_TYPE_POINTER || type1->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_do_operation()
1873 if (type2->kind == ZEND_FFI_TYPE_POINTER || type2->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_do_operation()
1877 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_do_operation()
1884 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_do_operation()
1910 if (type2->kind == ZEND_FFI_TYPE_POINTER || type2->kind == ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_do_operation()
1963 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_it_get_current_data()
2013 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in zend_ffi_cdata_get_iterator()
2049 switch (type->kind) { in zend_ffi_cdata_get_debug_info()
2081 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_cdata_get_debug_info()
2140 if (type->kind != ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_get_closure()
2147 if (type->kind != ZEND_FFI_TYPE_FUNC) { in zend_ffi_cdata_get_closure()
2222 } else if (type1->kind == type2->kind) { in zend_ffi_is_same_type()
2223 if (type1->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_same_type()
2225 } else if (type1->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_same_type()
2228 if (type1->kind == ZEND_FFI_TYPE_VOID || in zend_ffi_is_same_type()
2229 type2->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_same_type()
2232 } else if (type1->kind == ZEND_FFI_TYPE_ARRAY && in zend_ffi_is_same_type()
2302 switch (type->kind) { in _zend_ffi_type_dtor()
2465 if (type->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_clone_obj()
2484 …if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST && sym->kind != ZEND_F… in zend_ffi_read_var()
2493 if (sym->kind == ZEND_FFI_SYM_VAR) { in zend_ffi_read_var()
2495 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in zend_ffi_read_var()
2499 new_type->kind = ZEND_FFI_TYPE_POINTER; in zend_ffi_read_var()
2527 if (sym && sym->kind != ZEND_FFI_SYM_VAR) { in zend_ffi_write_var()
2551 zend_ffi_type_kind kind = type->kind; in zend_ffi_pass_arg() local
2556 switch (kind) { in zend_ffi_pass_arg()
2620 && ((ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_CHAR) in zend_ffi_pass_arg()
2621 || (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_VOID))) { in zend_ffi_pass_arg()
2628 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_pass_arg()
2640 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_pass_arg()
2667 kind = type->enumeration.kind; in zend_ffi_pass_arg()
2753 ZEND_ASSERT(type->kind == ZEND_FFI_TYPE_FUNC); in ZEND_FUNCTION()
2856 if (ZEND_FFI_TYPE(type->func.ret_type)->kind != ZEND_FFI_TYPE_VOID) { in ZEND_FUNCTION()
2900 if (sym && sym->kind != ZEND_FFI_SYM_FUNC) { in zend_ffi_get_func()
2910 ZEND_ASSERT(type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_get_func()
3042 if (sym->kind == ZEND_FFI_SYM_VAR) { in ZEND_METHOD()
3049 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in ZEND_METHOD()
3082 if (old->kind != type->kind in zend_ffi_same_types()
3089 switch (old->kind) { in zend_ffi_same_types()
3091 return old->enumeration.kind == type->enumeration.kind; in zend_ffi_same_types()
3160 if (old->kind != sym->kind || old->is_const != sym->is_const) { in zend_ffi_same_symbols()
3164 if (old->kind == ZEND_FFI_SYM_CONST) { in zend_ffi_same_symbols()
3176 if (old->kind != tag->kind) { in zend_ffi_same_tags()
3194 switch (dcl_type->kind) { in zend_ffi_subst_old_type()
3376 if (sym->kind == ZEND_FFI_SYM_VAR) { in zend_ffi_load()
3390 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in zend_ffi_load()
3445 …ading '%s', redefinition of '%s %s'", filename, zend_ffi_tag_kind_name[tag->kind], ZSTR_VAL(name)); in zend_ffi_load()
3638 if (type->kind == ZEND_FFI_TYPE_ENUM) { in zend_ffi_validate_incomplete_type()
3675 if (type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_validate_type()
3685 if (type->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_validate_var_type()
3713 switch (dcl_type->kind) { in zend_ffi_subst_type()
3871 if (type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
3897 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4012 if (type->kind < ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) < IS_STRING) { in ZEND_METHOD()
4024 } else if (type->kind == ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) == IS_LONG) { in ZEND_METHOD()
4034 } else if (type->kind == ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) == IS_NULL) { in ZEND_METHOD()
4055 if (type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4060 if (old_type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4061 && type->kind != ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4062 && ZEND_FFI_TYPE(old_type->pointer.type)->kind == ZEND_FFI_TYPE_VOID) { in ZEND_METHOD()
4065 } else if (old_type->kind == ZEND_FFI_TYPE_ARRAY in ZEND_METHOD()
4066 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4070 } else if (old_type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4071 && type->kind == ZEND_FFI_TYPE_ARRAY in ZEND_METHOD()
4225 if (type->kind == ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4228 } else if (type->kind == ZEND_FFI_TYPE_ARRAY && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) { in ZEND_METHOD()
4231 } else if (type->kind == ZEND_FFI_TYPE_VOID) { in ZEND_METHOD()
4259 …} else if (ZEND_FFI_TYPE(type)->kind == ZEND_FFI_TYPE_ARRAY && (ZEND_FFI_TYPE(type)->attr & ZEND_F… in ZEND_METHOD()
4266 new_type->kind = ZEND_FFI_TYPE_ARRAY; in ZEND_METHOD()
4308 if (GC_REFCOUNT(&cdata->std) == 1 && Z_REFCOUNT_P(arg) == 1 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4315 new_type->kind = ZEND_FFI_TYPE_POINTER; in ZEND_METHOD()
4413 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4417 if (type1->kind != ZEND_FFI_TYPE_POINTER && size > type1->size) { in ZEND_METHOD()
4433 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4437 if (type2->kind != ZEND_FFI_TYPE_POINTER && size > type2->size) { in ZEND_METHOD()
4477 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4481 if (type1->kind != ZEND_FFI_TYPE_POINTER && size > type1->size) { in ZEND_METHOD()
4501 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4505 if (type2->kind != ZEND_FFI_TYPE_POINTER && size > type2->size) { in ZEND_METHOD()
4543 if (type->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4547 if (type->kind != ZEND_FFI_TYPE_POINTER && size > type->size) { in ZEND_METHOD()
4576 if (type->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4580 if (type->kind != ZEND_FFI_TYPE_POINTER && size > type->size) { in ZEND_METHOD()
4587 …if (type->kind == ZEND_FFI_TYPE_POINTER && ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYP… in ZEND_METHOD()
4589 …} else if (type->kind == ZEND_FFI_TYPE_ARRAY && ZEND_FFI_TYPE(type->array.type)->kind == ZEND_FFI_… in ZEND_METHOD()
4620 if (type->kind != ZEND_FFI_TYPE_POINTER){ in ZEND_METHOD()
4660 RETURN_LONG(type->kind); in ZEND_METHOD()
4716 if (type->kind != ZEND_FFI_TYPE_ENUM) { in ZEND_METHOD()
4720 RETURN_LONG(type->enumeration.kind); in ZEND_METHOD()
4735 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in ZEND_METHOD()
4756 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in ZEND_METHOD()
4775 if (type->kind != ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4799 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4825 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4852 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4879 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4898 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4919 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4939 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
5593 static const zend_ffi_type zend_ffi_type_void = {.kind=ZEND_FFI_TYPE_VOID, .size=1, .align=1};
5594 static const zend_ffi_type zend_ffi_type_char = {.kind=ZEND_FFI_TYPE_CHAR, .size=1, .align=_Alignof…
5595 static const zend_ffi_type zend_ffi_type_bool = {.kind=ZEND_FFI_TYPE_BOOL, .size=1, .align=_Alignof…
5596 static const zend_ffi_type zend_ffi_type_sint8 = {.kind=ZEND_FFI_TYPE_SINT8, .size=1, .align=_Align…
5597 static const zend_ffi_type zend_ffi_type_uint8 = {.kind=ZEND_FFI_TYPE_UINT8, .size=1, .align=_Align…
5598 static const zend_ffi_type zend_ffi_type_sint16 = {.kind=ZEND_FFI_TYPE_SINT16, .size=2, .align=_Ali…
5599 static const zend_ffi_type zend_ffi_type_uint16 = {.kind=ZEND_FFI_TYPE_UINT16, .size=2, .align=_Ali…
5600 static const zend_ffi_type zend_ffi_type_sint32 = {.kind=ZEND_FFI_TYPE_SINT32, .size=4, .align=_Ali…
5601 static const zend_ffi_type zend_ffi_type_uint32 = {.kind=ZEND_FFI_TYPE_UINT32, .size=4, .align=_Ali…
5602 static const zend_ffi_type zend_ffi_type_sint64 = {.kind=ZEND_FFI_TYPE_SINT64, .size=8, .align=_Ali…
5603 static const zend_ffi_type zend_ffi_type_uint64 = {.kind=ZEND_FFI_TYPE_UINT64, .size=8, .align=_Ali…
5604 static const zend_ffi_type zend_ffi_type_float = {.kind=ZEND_FFI_TYPE_FLOAT, .size=sizeof(float), .…
5605 static const zend_ffi_type zend_ffi_type_double = {.kind=ZEND_FFI_TYPE_DOUBLE, .size=sizeof(double)…
5608 static const zend_ffi_type zend_ffi_type_long_double = {.kind=ZEND_FFI_TYPE_LONGDOUBLE, .size=sizeo…
5611 static const zend_ffi_type zend_ffi_type_ptr = {.kind=ZEND_FFI_TYPE_POINTER, .size=sizeof(void*), .…
5832 return (sym->kind == ZEND_FFI_SYM_TYPE);
5850 if (sym && sym->kind == ZEND_FFI_SYM_TYPE) {
5872 val->kind = ZEND_FFI_VAL_NAME;
5878 if (sym && sym->kind == ZEND_FFI_SYM_CONST) {
5880 switch (sym->type->kind) {
5884 val->kind = ZEND_FFI_VAL_INT32;
5887 val->kind = ZEND_FFI_VAL_INT64;
5892 val->kind = ZEND_FFI_VAL_UINT32;
5895 val->kind = ZEND_FFI_VAL_UINT64;
5903 val->kind = ZEND_FFI_VAL_ERROR;
5910 type->kind = ZEND_FFI_TYPE_ENUM;
5916 type->enumeration.kind = ZEND_FFI_TYPE_UINT8;
5920 type->enumeration.kind = ZEND_FFI_TYPE_UINT32;
5935 (enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT8 ||
5936 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT16 ||
5937 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT32 ||
5938 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT64);
5940 ZEND_ASSERT(enum_type && enum_type->kind == ZEND_FFI_TYPE_ENUM);
5941 if (val->kind == ZEND_FFI_VAL_EMPTY) {
5953 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
5962 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
5971 } else if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
6015 enum_type->enumeration.kind = sym_type->kind;
6029 sym->kind = ZEND_FFI_SYM_CONST;
6040 type->kind = ZEND_FFI_TYPE_STRUCT;
6095 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6140 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6143 if (field_type->kind != ZEND_FFI_TYPE_STRUCT) {
6207 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6215 if (field_type->kind < ZEND_FFI_TYPE_UINT8 || field_type->kind > ZEND_FFI_TYPE_BOOL) {
6220 if (bits->kind == ZEND_FFI_VAL_INT32 || bits->kind == ZEND_FFI_VAL_INT64) {
6234 } else if (bits->kind == ZEND_FFI_VAL_UINT32 || bits->kind == ZEND_FFI_VAL_UINT64) {
6307 ZEND_ASSERT(struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6321 type->kind = ZEND_FFI_TYPE_POINTER;
6340 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6343 } else if (type->kind == ZEND_FFI_TYPE_ARRAY && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) {
6360 if (len->kind == ZEND_FFI_VAL_EMPTY) {
6362 } else if (len->kind == ZEND_FFI_VAL_UINT32 || len->kind == ZEND_FFI_VAL_UINT64) {
6364 } else if (len->kind == ZEND_FFI_VAL_INT32 || len->kind == ZEND_FFI_VAL_INT64) {
6366 } else if (len->kind == ZEND_FFI_VAL_CHAR) {
6385 type->kind = ZEND_FFI_TYPE_ARRAY;
6400 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6403 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) {
6425 if (arg_type->kind == ZEND_FFI_TYPE_VOID) {
6453 …if (i >= 4 && i <= 5 && (arg_type->kind == ZEND_FFI_TYPE_FLOAT || arg_type->kind == ZEND_FFI_TYPE_…
6455 if (i < 6 && (arg_type->kind == ZEND_FFI_TYPE_FLOAT || arg_type->kind == ZEND_FFI_TYPE_DOUBLE)) {
6479 type->kind = ZEND_FFI_TYPE_FUNC;
6559 if (type->kind == ZEND_FFI_TYPE_ARRAY) {
6561 type->kind = ZEND_FFI_TYPE_POINTER;
6565 new_type->kind = ZEND_FFI_TYPE_POINTER;
6572 } else if (type->kind == ZEND_FFI_TYPE_FUNC) {
6574 new_type->kind = ZEND_FFI_TYPE_POINTER;
6604 && sym->kind == ZEND_FFI_SYM_TYPE
6614 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6615 if (sym->kind == ZEND_FFI_SYM_FUNC
6622 if (sym->kind == ZEND_FFI_SYM_VAR
6651 sym->kind = ZEND_FFI_SYM_TYPE;
6667 sym->kind = (type->kind == ZEND_FFI_TYPE_FUNC) ? ZEND_FFI_SYM_FUNC : ZEND_FFI_SYM_VAR;
6695 if (tag->kind != ZEND_FFI_TAG_STRUCT) {
6703 if (tag->kind != ZEND_FFI_TAG_UNION) {
6711 if (tag->kind != ZEND_FFI_TAG_ENUM) {
6731 tag->kind = ZEND_FFI_TAG_STRUCT;
6736 tag->kind = ZEND_FFI_TAG_UNION;
6741 tag->kind = ZEND_FFI_TAG_ENUM;
6909 …&& (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_V…
6918 …&& (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_V…
6927 && (val->kind == ZEND_FFI_VAL_NAME)) {
6994 …if ((val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_…
7009 switch (nested_type->kind) {
7075 switch (align_val->kind) {
7106 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7107 val->kind = ZEND_FFI_VAL_INT32; \
7109 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7110 val->kind = ZEND_FFI_VAL_INT32; \
7112 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7113 val->kind = ZEND_FFI_VAL_INT32; \
7115 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7116 val->kind = ZEND_FFI_VAL_INT32; \
7119 val->kind = ZEND_FFI_VAL_ERROR; \
7124 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7125 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7126 val->kind = MAX(val->kind, op2->kind); \
7128 } else if (op2->kind == ZEND_FFI_VAL_INT32) { \
7130 } else if (op2->kind == ZEND_FFI_VAL_INT64) { \
7132 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7133 val->kind = op2->kind; \
7135 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7138 val->kind = ZEND_FFI_VAL_ERROR; \
7140 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7141 if (op2->kind == ZEND_FFI_VAL_UINT32) { \
7143 } else if (op2->kind == ZEND_FFI_VAL_UINT64) { \
7145 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7146 val->kind = MAX(val->kind, op2->kind); \
7148 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7149 val->kind = op2->kind; \
7151 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7154 val->kind = ZEND_FFI_VAL_ERROR; \
7156 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7157 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7159 } else if (op2->kind == ZEND_FFI_VAL_INT32 ||op2->kind == ZEND_FFI_VAL_INT64) { \
7161 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7162 val->kind = MAX(val->kind, op2->kind); \
7164 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7167 val->kind = ZEND_FFI_VAL_ERROR; \
7169 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7170 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7171 val->kind = op2->kind; \
7173 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7174 val->kind = ZEND_FFI_VAL_INT64; \
7176 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7177 val->kind = op2->kind; \
7179 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7182 val->kind = ZEND_FFI_VAL_ERROR; \
7185 val->kind = ZEND_FFI_VAL_ERROR; \
7190 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7191 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7192 val->kind = MAX(val->kind, op2->kind); \
7194 } else if (op2->kind == ZEND_FFI_VAL_INT32) { \
7196 } else if (op2->kind == ZEND_FFI_VAL_INT64) { \
7198 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7200 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7203 val->kind = ZEND_FFI_VAL_ERROR; \
7205 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7206 if (op2->kind == ZEND_FFI_VAL_UINT32) { \
7208 } else if (op2->kind == ZEND_FFI_VAL_UINT64) { \
7210 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7211 val->kind = MAX(val->kind, op2->kind); \
7213 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7215 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7218 val->kind = ZEND_FFI_VAL_ERROR; \
7220 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7221 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7222 val->kind = op2->kind; \
7224 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7225 val->kind = op2->kind; \
7228 val->kind = ZEND_FFI_VAL_ERROR; \
7230 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7231 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7232 val->kind = op2->kind; \
7234 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7235 val->kind = op2->kind; \
7237 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7240 val->kind = ZEND_FFI_VAL_ERROR; \
7243 val->kind = ZEND_FFI_VAL_ERROR; \
7248 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7249 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7250 val->kind = ZEND_FFI_VAL_INT32; \
7252 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7253 val->kind = ZEND_FFI_VAL_INT32; \
7255 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7256 val->kind = ZEND_FFI_VAL_INT32; \
7258 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7259 val->kind = ZEND_FFI_VAL_INT32; \
7262 val->kind = ZEND_FFI_VAL_ERROR; \
7264 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7265 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7266 val->kind = ZEND_FFI_VAL_INT32; \
7268 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7269 val->kind = ZEND_FFI_VAL_INT32; \
7271 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7272 val->kind = ZEND_FFI_VAL_INT32; \
7274 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7275 val->kind = ZEND_FFI_VAL_INT32; \
7278 val->kind = ZEND_FFI_VAL_ERROR; \
7280 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7281 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7282 val->kind = ZEND_FFI_VAL_INT32; \
7284 } else if (op2->kind == ZEND_FFI_VAL_INT32 ||op2->kind == ZEND_FFI_VAL_INT64) { \
7285 val->kind = ZEND_FFI_VAL_INT32; \
7287 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7288 val->kind = ZEND_FFI_VAL_INT32; \
7290 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7291 val->kind = ZEND_FFI_VAL_INT32; \
7294 val->kind = ZEND_FFI_VAL_ERROR; \
7296 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
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; \
7313 val->kind = ZEND_FFI_VAL_ERROR; \
7320 if (val->kind == ZEND_FFI_VAL_INT32) {
7334 if (val->kind == ZEND_FFI_VAL_INT32 && op2->kind == ZEND_FFI_VAL_INT32) {
7337 val->kind = ZEND_FFI_VAL_ERROR;
7346 if (val->kind == ZEND_FFI_VAL_INT32 && op2->kind == ZEND_FFI_VAL_INT32) {
7349 val->kind = ZEND_FFI_VAL_ERROR;
7453 switch (ZEND_FFI_TYPE(dcl->type)->kind) {
7455 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7456 val->kind = ZEND_FFI_VAL_FLOAT;
7458 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7459 val->kind = ZEND_FFI_VAL_FLOAT;
7461 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7462 val->kind = ZEND_FFI_VAL_FLOAT;
7463 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7464 val->kind = ZEND_FFI_VAL_FLOAT;
7467 val->kind = ZEND_FFI_VAL_ERROR;
7471 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7472 val->kind = ZEND_FFI_VAL_DOUBLE;
7474 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7475 val->kind = ZEND_FFI_VAL_DOUBLE;
7477 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7478 val->kind = ZEND_FFI_VAL_DOUBLE;
7479 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7480 val->kind = ZEND_FFI_VAL_DOUBLE;
7483 val->kind = ZEND_FFI_VAL_ERROR;
7488 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7489 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7491 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7492 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7494 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7495 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7496 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7497 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7500 val->kind = ZEND_FFI_VAL_ERROR;
7508 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7509 val->kind = ZEND_FFI_VAL_UINT32;
7510 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7511 val->kind = ZEND_FFI_VAL_UINT32;
7513 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7514 val->kind = ZEND_FFI_VAL_UINT32;
7517 val->kind = ZEND_FFI_VAL_ERROR;
7523 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7524 val->kind = ZEND_FFI_VAL_INT32;
7525 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7526 val->kind = ZEND_FFI_VAL_INT32;
7528 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7529 val->kind = ZEND_FFI_VAL_INT32;
7532 val->kind = ZEND_FFI_VAL_ERROR;
7536 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7537 val->kind = ZEND_FFI_VAL_UINT64;
7538 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7539 val->kind = ZEND_FFI_VAL_UINT64;
7541 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7542 val->kind = ZEND_FFI_VAL_UINT64;
7545 val->kind = ZEND_FFI_VAL_ERROR;
7549 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7550 val->kind = ZEND_FFI_VAL_CHAR;
7552 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7553 val->kind = ZEND_FFI_VAL_CHAR;
7555 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7556 val->kind = ZEND_FFI_VAL_CHAR;
7558 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7560 val->kind = ZEND_FFI_VAL_ERROR;
7564 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7565 val->kind = ZEND_FFI_VAL_UINT32;
7566 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7567 val->kind = ZEND_FFI_VAL_UINT32;
7569 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7570 val->kind = ZEND_FFI_VAL_UINT32;
7573 val->kind = ZEND_FFI_VAL_ERROR;
7577 val->kind = ZEND_FFI_VAL_ERROR;
7586 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7587 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7588 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7589 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7591 val->kind = ZEND_FFI_VAL_ERROR;
7598 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7600 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7602 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7604 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7607 val->kind = ZEND_FFI_VAL_ERROR;
7614 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7616 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7618 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7621 val->kind = ZEND_FFI_VAL_ERROR;
7629 if (val->kind == ZEND_FFI_VAL_INT32) {
7637 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_INT32) {
7638 val->kind = ZEND_FFI_VAL_UINT32;
7640 } else if (val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_VAL_INT64) {
7641 val->kind = ZEND_FFI_VAL_UINT32;
7643 } else if (val->kind == ZEND_FFI_VAL_FLOAT) {
7644 val->kind = ZEND_FFI_VAL_UINT32;
7646 } else if (val->kind == ZEND_FFI_VAL_DOUBLE) {
7647 val->kind = ZEND_FFI_VAL_UINT32;
7649 } else if (val->kind == ZEND_FFI_VAL_LONG_DOUBLE) {
7650 val->kind = ZEND_FFI_VAL_UINT32;
7656 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7657 val->kind = ZEND_FFI_VAL_UINT32;
7659 } else if (val->kind == ZEND_FFI_VAL_STRING) {
7662 val->kind = ZEND_FFI_VAL_ERROR;
7664 val->kind = ZEND_FFI_VAL_UINT32;
7668 val->kind = ZEND_FFI_VAL_ERROR;
7679 val->kind = (type->size > 0xffffffff) ? ZEND_FFI_VAL_UINT64 : ZEND_FFI_VAL_UINT32;
7687 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_INT32) {
7688 val->kind = ZEND_FFI_VAL_UINT32;
7690 } else if (val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_VAL_INT64) {
7691 val->kind = ZEND_FFI_VAL_UINT32;
7693 } else if (val->kind == ZEND_FFI_VAL_FLOAT) {
7694 val->kind = ZEND_FFI_VAL_UINT32;
7696 } else if (val->kind == ZEND_FFI_VAL_DOUBLE) {
7697 val->kind = ZEND_FFI_VAL_UINT32;
7700 } else if (val->kind == ZEND_FFI_VAL_LONG_DOUBLE) {
7701 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) {
7708 val->kind = ZEND_FFI_VAL_UINT32;
7711 val->kind = ZEND_FFI_VAL_ERROR;
7719 val->kind = ZEND_FFI_VAL_UINT32;
7752 val->kind = ZEND_FFI_VAL_UINT32;
7754 val->kind = (sizeof(long) == 4) ? ZEND_FFI_VAL_UINT32 : ZEND_FFI_VAL_UINT64;
7756 val->kind = ZEND_FFI_VAL_UINT64;
7761 val->kind = ZEND_FFI_VAL_INT32;
7763 val->kind = (sizeof(long) == 4) ? ZEND_FFI_VAL_INT32 : ZEND_FFI_VAL_INT64;
7765 val->kind = ZEND_FFI_VAL_INT64;
7775 val->kind = ZEND_FFI_VAL_FLOAT;
7777 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7779 val->kind = ZEND_FFI_VAL_DOUBLE;
7787 val->kind = ZEND_FFI_VAL_ERROR;
7789 val->kind = ZEND_FFI_VAL_STRING;
7801 val->kind = ZEND_FFI_VAL_ERROR;
7803 val->kind = ZEND_FFI_VAL_CHAR;
7827 val->kind = ZEND_FFI_VAL_ERROR;
7830 val->kind = ZEND_FFI_VAL_ERROR;
7835 val->kind = ZEND_FFI_VAL_ERROR;
7845 val->kind = ZEND_FFI_VAL_ERROR;
7855 val->kind = ZEND_FFI_VAL_ERROR;
7862 val->kind = ZEND_FFI_VAL_ERROR;
7865 val->kind = ZEND_FFI_VAL_ERROR;