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()
817 kind = type->enumeration.kind; in zend_ffi_zval_to_cdata()
827 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_zval_to_cdata()
838 } else if (ZEND_FFI_TYPE(cdata->type)->kind != ZEND_FFI_TYPE_POINTER in zend_ffi_zval_to_cdata()
848 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_zval_to_cdata()
986 if (ret_type->kind != ZEND_FFI_TYPE_VOID) { in zend_ffi_callback_trampoline()
1153 zend_ffi_type_kind kind = ctype->kind; in zend_ffi_cdata_cast_object() local
1156 switch (kind) { in zend_ffi_cdata_cast_object()
1199 kind = ctype->enumeration.kind; in zend_ffi_cdata_cast_object()
1205 …} else if ((ctype->attr & ZEND_FFI_ATTR_CONST) && ZEND_FFI_TYPE(ctype->pointer.type)->kind == ZEND… in zend_ffi_cdata_cast_object()
1234 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1237 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_read_field()
1238 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_read_field()
1256 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1283 && field_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_field()
1311 if (type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1314 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_write_field()
1315 if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { in zend_ffi_cdata_write_field()
1333 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_write_field()
1380 if (EXPECTED(type->kind == ZEND_FFI_TYPE_ARRAY)) { in zend_ffi_cdata_read_dim()
1393 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_dim()
1404 } else if (EXPECTED(type->kind == ZEND_FFI_TYPE_POINTER)) { in zend_ffi_cdata_read_dim()
1410 && dim_type->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_read_dim()
1443 if (EXPECTED(type->kind == ZEND_FFI_TYPE_ARRAY)) { in zend_ffi_cdata_write_dim()
1459 } 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()
2223 } else if (type1->kind == type2->kind) { in zend_ffi_is_same_type()
2224 if (type1->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_same_type()
2226 } else if (type1->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_is_same_type()
2229 if (type1->kind == ZEND_FFI_TYPE_VOID || in zend_ffi_is_same_type()
2230 type2->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_is_same_type()
2233 } else if (type1->kind == ZEND_FFI_TYPE_ARRAY && in zend_ffi_is_same_type()
2303 switch (type->kind) { in _zend_ffi_type_dtor()
2466 if (type->kind < ZEND_FFI_TYPE_POINTER) { in zend_ffi_cdata_clone_obj()
2485 …if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST && sym->kind != ZEND_F… in zend_ffi_read_var()
2494 if (sym->kind == ZEND_FFI_SYM_VAR) { in zend_ffi_read_var()
2496 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in zend_ffi_read_var()
2500 new_type->kind = ZEND_FFI_TYPE_POINTER; in zend_ffi_read_var()
2528 if (sym && sym->kind != ZEND_FFI_SYM_VAR) { in zend_ffi_write_var()
2552 zend_ffi_type_kind kind = type->kind; in zend_ffi_pass_arg() local
2557 switch (kind) { in zend_ffi_pass_arg()
2621 && ((ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_CHAR) in zend_ffi_pass_arg()
2622 || (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_VOID))) { in zend_ffi_pass_arg()
2629 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in zend_ffi_pass_arg()
2641 } else if (ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_pass_arg()
2668 kind = type->enumeration.kind; in zend_ffi_pass_arg()
2754 ZEND_ASSERT(type->kind == ZEND_FFI_TYPE_FUNC); in ZEND_FUNCTION()
2857 if (ZEND_FFI_TYPE(type->func.ret_type)->kind != ZEND_FFI_TYPE_VOID) { in ZEND_FUNCTION()
2901 if (sym && sym->kind != ZEND_FFI_SYM_FUNC) { in zend_ffi_get_func()
2911 ZEND_ASSERT(type->kind == ZEND_FFI_TYPE_FUNC); in zend_ffi_get_func()
3079 if (sym->kind == ZEND_FFI_SYM_VAR) { in ZEND_METHOD()
3086 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in ZEND_METHOD()
3119 if (old->kind != type->kind in zend_ffi_same_types()
3126 switch (old->kind) { in zend_ffi_same_types()
3128 return old->enumeration.kind == type->enumeration.kind; in zend_ffi_same_types()
3197 if (old->kind != sym->kind || old->is_const != sym->is_const) { in zend_ffi_same_symbols()
3201 if (old->kind == ZEND_FFI_SYM_CONST) { in zend_ffi_same_symbols()
3213 if (old->kind != tag->kind) { in zend_ffi_same_tags()
3231 switch (dcl_type->kind) { in zend_ffi_subst_old_type()
3413 if (sym->kind == ZEND_FFI_SYM_VAR) { in zend_ffi_load()
3427 } else if (sym->kind == ZEND_FFI_SYM_FUNC) { in zend_ffi_load()
3482 …ading '%s', redefinition of '%s %s'", filename, zend_ffi_tag_kind_name[tag->kind], ZSTR_VAL(name)); in zend_ffi_load()
3675 if (type->kind == ZEND_FFI_TYPE_ENUM) { in zend_ffi_validate_incomplete_type()
3712 if (type->kind == ZEND_FFI_TYPE_VOID) { in zend_ffi_validate_type()
3722 if (type->kind == ZEND_FFI_TYPE_FUNC) { in zend_ffi_validate_var_type()
3750 switch (dcl_type->kind) { in zend_ffi_subst_type()
3908 if (type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
3934 if (ZEND_FFI_TYPE(cdata->type)->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4049 if (type->kind < ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) < IS_STRING) { in ZEND_METHOD()
4061 } else if (type->kind == ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) == IS_LONG) { in ZEND_METHOD()
4071 } else if (type->kind == ZEND_FFI_TYPE_POINTER && Z_TYPE_P(zv) == IS_NULL) { in ZEND_METHOD()
4092 if (type->kind < ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4097 if (old_type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4098 && type->kind != ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4099 && ZEND_FFI_TYPE(old_type->pointer.type)->kind == ZEND_FFI_TYPE_VOID) { in ZEND_METHOD()
4102 } else if (old_type->kind == ZEND_FFI_TYPE_ARRAY in ZEND_METHOD()
4103 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4107 } else if (old_type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4108 && type->kind == ZEND_FFI_TYPE_ARRAY in ZEND_METHOD()
4262 if (type->kind == ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4265 } else if (type->kind == ZEND_FFI_TYPE_ARRAY && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) { in ZEND_METHOD()
4268 } else if (type->kind == ZEND_FFI_TYPE_VOID) { in ZEND_METHOD()
4296 …} else if (ZEND_FFI_TYPE(type)->kind == ZEND_FFI_TYPE_ARRAY && (ZEND_FFI_TYPE(type)->attr & ZEND_F… in ZEND_METHOD()
4303 new_type->kind = ZEND_FFI_TYPE_ARRAY; in ZEND_METHOD()
4345 if (GC_REFCOUNT(&cdata->std) == 1 && Z_REFCOUNT_P(arg) == 1 && type->kind == ZEND_FFI_TYPE_POINTER in ZEND_METHOD()
4352 new_type->kind = ZEND_FFI_TYPE_POINTER; in ZEND_METHOD()
4450 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4454 if (type1->kind != ZEND_FFI_TYPE_POINTER && size > type1->size) { in ZEND_METHOD()
4470 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4474 if (type2->kind != ZEND_FFI_TYPE_POINTER && size > type2->size) { in ZEND_METHOD()
4514 if (type1->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4518 if (type1->kind != ZEND_FFI_TYPE_POINTER && size > type1->size) { in ZEND_METHOD()
4538 if (type2->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4542 if (type2->kind != ZEND_FFI_TYPE_POINTER && size > type2->size) { in ZEND_METHOD()
4580 if (type->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4584 if (type->kind != ZEND_FFI_TYPE_POINTER && size > type->size) { in ZEND_METHOD()
4613 if (type->kind == ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4617 if (type->kind != ZEND_FFI_TYPE_POINTER && size > type->size) { in ZEND_METHOD()
4624 …if (type->kind == ZEND_FFI_TYPE_POINTER && ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYP… in ZEND_METHOD()
4626 …} else if (type->kind == ZEND_FFI_TYPE_ARRAY && ZEND_FFI_TYPE(type->array.type)->kind == ZEND_FFI_… in ZEND_METHOD()
4657 if (type->kind != ZEND_FFI_TYPE_POINTER){ in ZEND_METHOD()
4697 RETURN_LONG(type->kind); in ZEND_METHOD()
4753 if (type->kind != ZEND_FFI_TYPE_ENUM) { in ZEND_METHOD()
4757 RETURN_LONG(type->enumeration.kind); in ZEND_METHOD()
4772 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in ZEND_METHOD()
4793 if (type->kind != ZEND_FFI_TYPE_ARRAY) { in ZEND_METHOD()
4812 if (type->kind != ZEND_FFI_TYPE_POINTER) { in ZEND_METHOD()
4836 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4862 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4889 if (type->kind != ZEND_FFI_TYPE_STRUCT) { in ZEND_METHOD()
4916 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4935 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4956 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
4976 if (type->kind != ZEND_FFI_TYPE_FUNC) { in ZEND_METHOD()
5635 static const zend_ffi_type zend_ffi_type_void = {.kind=ZEND_FFI_TYPE_VOID, .size=1, .align=1};
5636 static const zend_ffi_type zend_ffi_type_char = {.kind=ZEND_FFI_TYPE_CHAR, .size=1, .align=_Alignof…
5637 static const zend_ffi_type zend_ffi_type_bool = {.kind=ZEND_FFI_TYPE_BOOL, .size=1, .align=_Alignof…
5638 static const zend_ffi_type zend_ffi_type_sint8 = {.kind=ZEND_FFI_TYPE_SINT8, .size=1, .align=_Align…
5639 static const zend_ffi_type zend_ffi_type_uint8 = {.kind=ZEND_FFI_TYPE_UINT8, .size=1, .align=_Align…
5640 static const zend_ffi_type zend_ffi_type_sint16 = {.kind=ZEND_FFI_TYPE_SINT16, .size=2, .align=_Ali…
5641 static const zend_ffi_type zend_ffi_type_uint16 = {.kind=ZEND_FFI_TYPE_UINT16, .size=2, .align=_Ali…
5642 static const zend_ffi_type zend_ffi_type_sint32 = {.kind=ZEND_FFI_TYPE_SINT32, .size=4, .align=_Ali…
5643 static const zend_ffi_type zend_ffi_type_uint32 = {.kind=ZEND_FFI_TYPE_UINT32, .size=4, .align=_Ali…
5644 static const zend_ffi_type zend_ffi_type_sint64 = {.kind=ZEND_FFI_TYPE_SINT64, .size=8, .align=_Ali…
5645 static const zend_ffi_type zend_ffi_type_uint64 = {.kind=ZEND_FFI_TYPE_UINT64, .size=8, .align=_Ali…
5646 static const zend_ffi_type zend_ffi_type_float = {.kind=ZEND_FFI_TYPE_FLOAT, .size=sizeof(float), .…
5647 static const zend_ffi_type zend_ffi_type_double = {.kind=ZEND_FFI_TYPE_DOUBLE, .size=sizeof(double)…
5650 static const zend_ffi_type zend_ffi_type_long_double = {.kind=ZEND_FFI_TYPE_LONGDOUBLE, .size=sizeo…
5653 static const zend_ffi_type zend_ffi_type_ptr = {.kind=ZEND_FFI_TYPE_POINTER, .size=sizeof(void*), .…
5874 return (sym->kind == ZEND_FFI_SYM_TYPE);
5892 if (sym && sym->kind == ZEND_FFI_SYM_TYPE) {
5914 val->kind = ZEND_FFI_VAL_NAME;
5920 if (sym && sym->kind == ZEND_FFI_SYM_CONST) {
5922 switch (sym->type->kind) {
5926 val->kind = ZEND_FFI_VAL_INT32;
5929 val->kind = ZEND_FFI_VAL_INT64;
5934 val->kind = ZEND_FFI_VAL_UINT32;
5937 val->kind = ZEND_FFI_VAL_UINT64;
5945 val->kind = ZEND_FFI_VAL_ERROR;
5952 type->kind = ZEND_FFI_TYPE_ENUM;
5958 type->enumeration.kind = ZEND_FFI_TYPE_UINT8;
5962 type->enumeration.kind = ZEND_FFI_TYPE_UINT32;
5977 (enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT8 ||
5978 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT16 ||
5979 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT32 ||
5980 enum_type->enumeration.kind == ZEND_FFI_TYPE_SINT64);
5982 ZEND_ASSERT(enum_type && enum_type->kind == ZEND_FFI_TYPE_ENUM);
5983 if (val->kind == ZEND_FFI_VAL_EMPTY) {
5995 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
6004 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
6013 } else if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
6057 enum_type->enumeration.kind = sym_type->kind;
6071 sym->kind = ZEND_FFI_SYM_CONST;
6082 type->kind = ZEND_FFI_TYPE_STRUCT;
6137 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6182 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6185 if (field_type->kind != ZEND_FFI_TYPE_STRUCT) {
6249 ZEND_ASSERT(struct_type && struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6257 if (field_type->kind < ZEND_FFI_TYPE_UINT8 || field_type->kind > ZEND_FFI_TYPE_BOOL) {
6262 if (bits->kind == ZEND_FFI_VAL_INT32 || bits->kind == ZEND_FFI_VAL_INT64) {
6276 } else if (bits->kind == ZEND_FFI_VAL_UINT32 || bits->kind == ZEND_FFI_VAL_UINT64) {
6349 ZEND_ASSERT(struct_type->kind == ZEND_FFI_TYPE_STRUCT);
6363 type->kind = ZEND_FFI_TYPE_POINTER;
6382 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6385 } else if (type->kind == ZEND_FFI_TYPE_ARRAY && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) {
6402 if (len->kind == ZEND_FFI_VAL_EMPTY) {
6404 } else if (len->kind == ZEND_FFI_VAL_UINT32 || len->kind == ZEND_FFI_VAL_UINT64) {
6406 } else if (len->kind == ZEND_FFI_VAL_INT32 || len->kind == ZEND_FFI_VAL_INT64) {
6408 } else if (len->kind == ZEND_FFI_VAL_CHAR) {
6427 type->kind = ZEND_FFI_TYPE_ARRAY;
6442 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6445 } else if (type->kind == ZEND_FFI_TYPE_ARRAY) {
6467 if (arg_type->kind == ZEND_FFI_TYPE_VOID) {
6495 …if (i >= 4 && i <= 5 && (arg_type->kind == ZEND_FFI_TYPE_FLOAT || arg_type->kind == ZEND_FFI_TYPE_…
6497 if (i < 6 && (arg_type->kind == ZEND_FFI_TYPE_FLOAT || arg_type->kind == ZEND_FFI_TYPE_DOUBLE)) {
6521 type->kind = ZEND_FFI_TYPE_FUNC;
6601 if (type->kind == ZEND_FFI_TYPE_ARRAY) {
6603 type->kind = ZEND_FFI_TYPE_POINTER;
6607 new_type->kind = ZEND_FFI_TYPE_POINTER;
6614 } else if (type->kind == ZEND_FFI_TYPE_FUNC) {
6616 new_type->kind = ZEND_FFI_TYPE_POINTER;
6646 && sym->kind == ZEND_FFI_SYM_TYPE
6656 if (type->kind == ZEND_FFI_TYPE_FUNC) {
6657 if (sym->kind == ZEND_FFI_SYM_FUNC
6664 if (sym->kind == ZEND_FFI_SYM_VAR
6693 sym->kind = ZEND_FFI_SYM_TYPE;
6709 sym->kind = (type->kind == ZEND_FFI_TYPE_FUNC) ? ZEND_FFI_SYM_FUNC : ZEND_FFI_SYM_VAR;
6737 if (tag->kind != ZEND_FFI_TAG_STRUCT) {
6745 if (tag->kind != ZEND_FFI_TAG_UNION) {
6753 if (tag->kind != ZEND_FFI_TAG_ENUM) {
6773 tag->kind = ZEND_FFI_TAG_STRUCT;
6778 tag->kind = ZEND_FFI_TAG_UNION;
6783 tag->kind = ZEND_FFI_TAG_ENUM;
6951 …&& (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_V…
6960 …&& (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_V…
6969 && (val->kind == ZEND_FFI_VAL_NAME)) {
7036 …if ((val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_…
7051 switch (nested_type->kind) {
7117 switch (align_val->kind) {
7148 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7149 val->kind = ZEND_FFI_VAL_INT32; \
7151 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7152 val->kind = ZEND_FFI_VAL_INT32; \
7154 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7155 val->kind = ZEND_FFI_VAL_INT32; \
7157 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7158 val->kind = ZEND_FFI_VAL_INT32; \
7161 val->kind = ZEND_FFI_VAL_ERROR; \
7166 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7167 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7168 val->kind = MAX(val->kind, op2->kind); \
7170 } else if (op2->kind == ZEND_FFI_VAL_INT32) { \
7172 } else if (op2->kind == ZEND_FFI_VAL_INT64) { \
7174 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7175 val->kind = op2->kind; \
7177 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7180 val->kind = ZEND_FFI_VAL_ERROR; \
7182 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7183 if (op2->kind == ZEND_FFI_VAL_UINT32) { \
7185 } else if (op2->kind == ZEND_FFI_VAL_UINT64) { \
7187 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7188 val->kind = MAX(val->kind, op2->kind); \
7190 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7191 val->kind = op2->kind; \
7193 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7196 val->kind = ZEND_FFI_VAL_ERROR; \
7198 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7199 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7201 } else if (op2->kind == ZEND_FFI_VAL_INT32 ||op2->kind == ZEND_FFI_VAL_INT64) { \
7203 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7204 val->kind = MAX(val->kind, op2->kind); \
7206 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7209 val->kind = ZEND_FFI_VAL_ERROR; \
7211 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7212 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7213 val->kind = op2->kind; \
7215 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7216 val->kind = ZEND_FFI_VAL_INT64; \
7218 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7219 val->kind = op2->kind; \
7221 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7224 val->kind = ZEND_FFI_VAL_ERROR; \
7227 val->kind = ZEND_FFI_VAL_ERROR; \
7232 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7233 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7234 val->kind = MAX(val->kind, op2->kind); \
7236 } else if (op2->kind == ZEND_FFI_VAL_INT32) { \
7238 } else if (op2->kind == ZEND_FFI_VAL_INT64) { \
7240 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7242 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7245 val->kind = ZEND_FFI_VAL_ERROR; \
7247 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7248 if (op2->kind == ZEND_FFI_VAL_UINT32) { \
7250 } else if (op2->kind == ZEND_FFI_VAL_UINT64) { \
7252 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7253 val->kind = MAX(val->kind, op2->kind); \
7255 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7257 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7260 val->kind = ZEND_FFI_VAL_ERROR; \
7262 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7263 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7264 val->kind = op2->kind; \
7266 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7267 val->kind = op2->kind; \
7270 val->kind = ZEND_FFI_VAL_ERROR; \
7272 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7273 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7274 val->kind = op2->kind; \
7276 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7277 val->kind = op2->kind; \
7279 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7282 val->kind = ZEND_FFI_VAL_ERROR; \
7285 val->kind = ZEND_FFI_VAL_ERROR; \
7290 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) { \
7291 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7292 val->kind = ZEND_FFI_VAL_INT32; \
7294 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7295 val->kind = ZEND_FFI_VAL_INT32; \
7297 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7298 val->kind = ZEND_FFI_VAL_INT32; \
7300 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7301 val->kind = ZEND_FFI_VAL_INT32; \
7304 val->kind = ZEND_FFI_VAL_ERROR; \
7306 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) { \
7307 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7308 val->kind = ZEND_FFI_VAL_INT32; \
7310 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7311 val->kind = ZEND_FFI_VAL_INT32; \
7313 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7314 val->kind = ZEND_FFI_VAL_INT32; \
7316 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7317 val->kind = ZEND_FFI_VAL_INT32; \
7320 val->kind = ZEND_FFI_VAL_ERROR; \
7322 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7323 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7324 val->kind = ZEND_FFI_VAL_INT32; \
7326 } else if (op2->kind == ZEND_FFI_VAL_INT32 ||op2->kind == ZEND_FFI_VAL_INT64) { \
7327 val->kind = ZEND_FFI_VAL_INT32; \
7329 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7330 val->kind = ZEND_FFI_VAL_INT32; \
7332 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7333 val->kind = ZEND_FFI_VAL_INT32; \
7336 val->kind = ZEND_FFI_VAL_ERROR; \
7338 } else if (val->kind == ZEND_FFI_VAL_CHAR) { \
7339 if (op2->kind == ZEND_FFI_VAL_UINT32 || op2->kind == ZEND_FFI_VAL_UINT64) { \
7340 val->kind = ZEND_FFI_VAL_INT32; \
7342 } else if (op2->kind == ZEND_FFI_VAL_INT32 || op2->kind == ZEND_FFI_VAL_INT64) { \
7343 val->kind = ZEND_FFI_VAL_INT32; \
7345 …} else if (op2->kind == ZEND_FFI_VAL_FLOAT || op2->kind == ZEND_FFI_VAL_DOUBLE || op2->kind == ZEN…
7346 val->kind = ZEND_FFI_VAL_INT32; \
7348 } else if (op2->kind == ZEND_FFI_VAL_CHAR) { \
7349 val->kind = ZEND_FFI_VAL_INT32; \
7352 val->kind = ZEND_FFI_VAL_ERROR; \
7355 val->kind = ZEND_FFI_VAL_ERROR; \
7362 if (val->kind == ZEND_FFI_VAL_INT32) {
7376 if (val->kind == ZEND_FFI_VAL_INT32 && op2->kind == ZEND_FFI_VAL_INT32) {
7379 val->kind = ZEND_FFI_VAL_ERROR;
7388 if (val->kind == ZEND_FFI_VAL_INT32 && op2->kind == ZEND_FFI_VAL_INT32) {
7391 val->kind = ZEND_FFI_VAL_ERROR;
7495 switch (ZEND_FFI_TYPE(dcl->type)->kind) {
7497 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7498 val->kind = ZEND_FFI_VAL_FLOAT;
7500 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7501 val->kind = ZEND_FFI_VAL_FLOAT;
7503 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7504 val->kind = ZEND_FFI_VAL_FLOAT;
7505 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7506 val->kind = ZEND_FFI_VAL_FLOAT;
7509 val->kind = ZEND_FFI_VAL_ERROR;
7513 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7514 val->kind = ZEND_FFI_VAL_DOUBLE;
7516 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7517 val->kind = ZEND_FFI_VAL_DOUBLE;
7519 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7520 val->kind = ZEND_FFI_VAL_DOUBLE;
7521 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7522 val->kind = ZEND_FFI_VAL_DOUBLE;
7525 val->kind = ZEND_FFI_VAL_ERROR;
7530 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7531 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7533 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7534 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7536 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7537 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7538 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7539 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7542 val->kind = ZEND_FFI_VAL_ERROR;
7550 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7551 val->kind = ZEND_FFI_VAL_UINT32;
7552 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7553 val->kind = ZEND_FFI_VAL_UINT32;
7555 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7556 val->kind = ZEND_FFI_VAL_UINT32;
7559 val->kind = ZEND_FFI_VAL_ERROR;
7565 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7566 val->kind = ZEND_FFI_VAL_INT32;
7567 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7568 val->kind = ZEND_FFI_VAL_INT32;
7570 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7571 val->kind = ZEND_FFI_VAL_INT32;
7574 val->kind = ZEND_FFI_VAL_ERROR;
7578 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7579 val->kind = ZEND_FFI_VAL_UINT64;
7580 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7581 val->kind = ZEND_FFI_VAL_UINT64;
7583 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7584 val->kind = ZEND_FFI_VAL_UINT64;
7587 val->kind = ZEND_FFI_VAL_ERROR;
7591 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7592 val->kind = ZEND_FFI_VAL_CHAR;
7594 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7595 val->kind = ZEND_FFI_VAL_CHAR;
7597 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7598 val->kind = ZEND_FFI_VAL_CHAR;
7600 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7602 val->kind = ZEND_FFI_VAL_ERROR;
7606 …if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_…
7607 val->kind = ZEND_FFI_VAL_UINT32;
7608 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7609 val->kind = ZEND_FFI_VAL_UINT32;
7611 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7612 val->kind = ZEND_FFI_VAL_UINT32;
7615 val->kind = ZEND_FFI_VAL_ERROR;
7619 val->kind = ZEND_FFI_VAL_ERROR;
7628 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7629 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7630 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7631 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7633 val->kind = ZEND_FFI_VAL_ERROR;
7640 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7642 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7644 …} else if (val->kind == ZEND_FFI_VAL_FLOAT || val->kind == ZEND_FFI_VAL_DOUBLE || val->kind == ZEN…
7646 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7649 val->kind = ZEND_FFI_VAL_ERROR;
7656 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_UINT64) {
7658 } else if (val->kind == ZEND_FFI_VAL_INT32 || val->kind == ZEND_FFI_VAL_INT64) {
7660 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7663 val->kind = ZEND_FFI_VAL_ERROR;
7671 if (val->kind == ZEND_FFI_VAL_INT32) {
7679 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_INT32) {
7680 val->kind = ZEND_FFI_VAL_UINT32;
7682 } else if (val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_VAL_INT64) {
7683 val->kind = ZEND_FFI_VAL_UINT32;
7685 } else if (val->kind == ZEND_FFI_VAL_FLOAT) {
7686 val->kind = ZEND_FFI_VAL_UINT32;
7688 } else if (val->kind == ZEND_FFI_VAL_DOUBLE) {
7689 val->kind = ZEND_FFI_VAL_UINT32;
7691 } else if (val->kind == ZEND_FFI_VAL_LONG_DOUBLE) {
7692 val->kind = ZEND_FFI_VAL_UINT32;
7698 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7699 val->kind = ZEND_FFI_VAL_UINT32;
7701 } else if (val->kind == ZEND_FFI_VAL_STRING) {
7704 val->kind = ZEND_FFI_VAL_ERROR;
7706 val->kind = ZEND_FFI_VAL_UINT32;
7710 val->kind = ZEND_FFI_VAL_ERROR;
7721 val->kind = (type->size > 0xffffffff) ? ZEND_FFI_VAL_UINT64 : ZEND_FFI_VAL_UINT32;
7729 if (val->kind == ZEND_FFI_VAL_UINT32 || val->kind == ZEND_FFI_VAL_INT32) {
7730 val->kind = ZEND_FFI_VAL_UINT32;
7732 } else if (val->kind == ZEND_FFI_VAL_UINT64 || val->kind == ZEND_FFI_VAL_INT64) {
7733 val->kind = ZEND_FFI_VAL_UINT32;
7735 } else if (val->kind == ZEND_FFI_VAL_FLOAT) {
7736 val->kind = ZEND_FFI_VAL_UINT32;
7738 } else if (val->kind == ZEND_FFI_VAL_DOUBLE) {
7739 val->kind = ZEND_FFI_VAL_UINT32;
7742 } else if (val->kind == ZEND_FFI_VAL_LONG_DOUBLE) {
7743 val->kind = ZEND_FFI_VAL_UINT32;
7746 } else if (val->kind == ZEND_FFI_VAL_CHAR) {
7747 val->kind = ZEND_FFI_VAL_UINT32;
7749 } else if (val->kind == ZEND_FFI_VAL_STRING) {
7750 val->kind = ZEND_FFI_VAL_UINT32;
7753 val->kind = ZEND_FFI_VAL_ERROR;
7761 val->kind = ZEND_FFI_VAL_UINT32;
7794 val->kind = ZEND_FFI_VAL_UINT32;
7796 val->kind = (sizeof(long) == 4) ? ZEND_FFI_VAL_UINT32 : ZEND_FFI_VAL_UINT64;
7798 val->kind = ZEND_FFI_VAL_UINT64;
7803 val->kind = ZEND_FFI_VAL_INT32;
7805 val->kind = (sizeof(long) == 4) ? ZEND_FFI_VAL_INT32 : ZEND_FFI_VAL_INT64;
7807 val->kind = ZEND_FFI_VAL_INT64;
7817 val->kind = ZEND_FFI_VAL_FLOAT;
7819 val->kind = ZEND_FFI_VAL_LONG_DOUBLE;
7821 val->kind = ZEND_FFI_VAL_DOUBLE;
7829 val->kind = ZEND_FFI_VAL_ERROR;
7831 val->kind = ZEND_FFI_VAL_STRING;
7843 val->kind = ZEND_FFI_VAL_ERROR;
7845 val->kind = ZEND_FFI_VAL_CHAR;
7869 val->kind = ZEND_FFI_VAL_ERROR;
7872 val->kind = ZEND_FFI_VAL_ERROR;
7877 val->kind = ZEND_FFI_VAL_ERROR;
7887 val->kind = ZEND_FFI_VAL_ERROR;
7897 val->kind = ZEND_FFI_VAL_ERROR;
7904 val->kind = ZEND_FFI_VAL_ERROR;
7907 val->kind = ZEND_FFI_VAL_ERROR;