Lines Matching refs:FFI_G

1087 	if (!FFI_G(callbacks)) {  in zend_ffi_create_callback()
1088 FFI_G(callbacks) = emalloc(sizeof(HashTable)); in zend_ffi_create_callback()
1089 zend_hash_init(FFI_G(callbacks), 0, NULL, zend_ffi_callback_hash_dtor, 0); in zend_ffi_create_callback()
1091 zend_hash_next_index_insert_ptr(FFI_G(callbacks), callback_data); in zend_ffi_create_callback()
2950 if (EXPECTED(FFI_G(restriction) > ZEND_FFI_ENABLED)) { in zend_ffi_validate_api_restriction()
2951 ZEND_ASSERT(FFI_G(restriction) == ZEND_FFI_PRELOAD); in zend_ffi_validate_api_restriction()
2952 if (FFI_G(is_cli) in zend_ffi_validate_api_restriction()
2958 } else if (EXPECTED(FFI_G(restriction) == ZEND_FFI_ENABLED)) { in zend_ffi_validate_api_restriction()
3012 FFI_G(symbols) = NULL; in ZEND_METHOD()
3013 FFI_G(tags) = NULL; in ZEND_METHOD()
3017 FFI_G(default_type_attr) = ZEND_FFI_ATTR_STORED; in ZEND_METHOD()
3020 if (FFI_G(symbols)) { in ZEND_METHOD()
3021 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3022 efree(FFI_G(symbols)); in ZEND_METHOD()
3023 FFI_G(symbols) = NULL; in ZEND_METHOD()
3025 if (FFI_G(tags)) { in ZEND_METHOD()
3026 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3027 efree(FFI_G(tags)); in ZEND_METHOD()
3028 FFI_G(tags) = NULL; in ZEND_METHOD()
3033 if (FFI_G(symbols)) { in ZEND_METHOD()
3037 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in ZEND_METHOD()
3062 ffi->symbols = FFI_G(symbols); in ZEND_METHOD()
3063 ffi->tags = FFI_G(tags); in ZEND_METHOD()
3065 FFI_G(symbols) = NULL; in ZEND_METHOD()
3066 FFI_G(tags) = NULL; in ZEND_METHOD()
3227 if (FFI_G(symbols)) { in zend_ffi_cleanup_type()
3228 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(symbols), sym) { in zend_ffi_cleanup_type()
3232 if (FFI_G(tags)) { in zend_ffi_cleanup_type()
3233 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(tags), tag) { in zend_ffi_cleanup_type()
3242 if (!FFI_G(weak_types)) { in zend_ffi_remember_type()
3243 FFI_G(weak_types) = emalloc(sizeof(HashTable)); in zend_ffi_remember_type()
3244 zend_hash_init(FFI_G(weak_types), 0, NULL, zend_ffi_type_hash_dtor, 0); in zend_ffi_remember_type()
3248 zend_hash_next_index_insert_ptr(FFI_G(weak_types), ZEND_FFI_TYPE_MAKE_OWNED(type)); in zend_ffi_remember_type()
3305 FFI_G(symbols) = NULL; in zend_ffi_load()
3306 FFI_G(tags) = NULL; in zend_ffi_load()
3307 FFI_G(persistent) = preload; in zend_ffi_load()
3308 FFI_G(default_type_attr) = preload ? in zend_ffi_load()
3318 FFI_G(persistent) = 0; in zend_ffi_load()
3365 if (FFI_G(scopes)) { in zend_ffi_load()
3366 scope = zend_hash_str_find_ptr(FFI_G(scopes), scope_name, scope_name_len); in zend_ffi_load()
3370 if (FFI_G(symbols)) { in zend_ffi_load()
3371 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in zend_ffi_load()
3428 if (scope && scope->tags && FFI_G(tags)) { in zend_ffi_load()
3429 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), name, tag) { in zend_ffi_load()
3453 scope->symbols = FFI_G(symbols); in zend_ffi_load()
3454 scope->tags = FFI_G(tags); in zend_ffi_load()
3456 if (!FFI_G(scopes)) { in zend_ffi_load()
3457 FFI_G(scopes) = malloc(sizeof(HashTable)); in zend_ffi_load()
3458 zend_hash_init(FFI_G(scopes), 0, NULL, zend_ffi_scope_hash_dtor, 1); in zend_ffi_load()
3461 zend_hash_str_add_ptr(FFI_G(scopes), scope_name, scope_name_len, scope); in zend_ffi_load()
3463 if (FFI_G(symbols)) { in zend_ffi_load()
3465 scope->symbols = FFI_G(symbols); in zend_ffi_load()
3466 FFI_G(symbols) = NULL; in zend_ffi_load()
3468 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in zend_ffi_load()
3474 FFI_G(symbols)->pDestructor = NULL; in zend_ffi_load()
3475 zend_hash_destroy(FFI_G(symbols)); in zend_ffi_load()
3478 if (FFI_G(tags)) { in zend_ffi_load()
3480 scope->tags = FFI_G(tags); in zend_ffi_load()
3481 FFI_G(tags) = NULL; in zend_ffi_load()
3483 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), name, tag) { in zend_ffi_load()
3489 FFI_G(tags)->pDestructor = NULL; in zend_ffi_load()
3490 zend_hash_destroy(FFI_G(tags)); in zend_ffi_load()
3506 ffi->symbols = FFI_G(symbols); in zend_ffi_load()
3507 ffi->tags = FFI_G(tags); in zend_ffi_load()
3511 FFI_G(symbols) = NULL; in zend_ffi_load()
3512 FFI_G(tags) = NULL; in zend_ffi_load()
3513 FFI_G(persistent) = 0; in zend_ffi_load()
3519 if (FFI_G(symbols)) { in zend_ffi_load()
3520 zend_hash_destroy(FFI_G(symbols)); in zend_ffi_load()
3521 pefree(FFI_G(symbols), preload); in zend_ffi_load()
3522 FFI_G(symbols) = NULL; in zend_ffi_load()
3524 if (FFI_G(tags)) { in zend_ffi_load()
3525 zend_hash_destroy(FFI_G(tags)); in zend_ffi_load()
3526 pefree(FFI_G(tags), preload); in zend_ffi_load()
3527 FFI_G(tags) = NULL; in zend_ffi_load()
3529 FFI_G(persistent) = 0; in zend_ffi_load()
3568 if (FFI_G(scopes)) { in ZEND_METHOD()
3569 scope = zend_hash_find_ptr(FFI_G(scopes), scope_name); in ZEND_METHOD()
3617 if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { in zend_ffi_validate_vla()
3618 …ser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); in zend_ffi_validate_vla()
3628 if (FFI_G(tags)) { in zend_ffi_validate_incomplete_type()
3632 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), key, tag) { in zend_ffi_validate_incomplete_type()
3635 zend_ffi_throw_parser_error("Incomplete enum \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3637 zend_ffi_throw_parser_error("Incomplete union \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3639 … zend_ffi_throw_parser_error("Incomplete struct \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3645 if (FFI_G(symbols)) { in zend_ffi_validate_incomplete_type()
3649 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), key, sym) { in zend_ffi_validate_incomplete_type()
3651 zend_ffi_throw_parser_error("Incomplete C type %s at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3656 zend_ffi_throw_parser_error("Incomplete type at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3659 zend_ffi_throw_parser_error("\"[]\" is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3661 } else if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { in zend_ffi_validate_incomplete_type()
3662 …ser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3672 zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_type()
3682 zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_var_type()
3694 LONGJMP(FFI_G(bailout), FAILURE); in zend_ffi_validate_type_name()
3744 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(tags), tag) { in zend_ffi_tags_cleanup()
3751 zend_hash_destroy(FFI_G(tags)); in zend_ffi_tags_cleanup()
3752 efree(FFI_G(tags)); in zend_ffi_tags_cleanup()
3797 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
3798 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
3800 FFI_G(symbols) = NULL; in ZEND_METHOD()
3801 FFI_G(tags) = NULL; in ZEND_METHOD()
3803 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
3804 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
3806 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
3810 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3811 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3812 efree(FFI_G(tags)); in ZEND_METHOD()
3813 FFI_G(tags) = NULL; in ZEND_METHOD()
3815 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3816 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3817 efree(FFI_G(symbols)); in ZEND_METHOD()
3818 FFI_G(symbols) = NULL; in ZEND_METHOD()
3828 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3831 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3832 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3833 efree(FFI_G(symbols)); in ZEND_METHOD()
3834 FFI_G(symbols) = NULL; in ZEND_METHOD()
3836 FFI_G(symbols) = NULL; in ZEND_METHOD()
3837 FFI_G(tags) = NULL; in ZEND_METHOD()
3947 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
3948 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
3950 FFI_G(symbols) = NULL; in ZEND_METHOD()
3951 FFI_G(tags) = NULL; in ZEND_METHOD()
3953 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
3954 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
3956 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
3960 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3961 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3962 efree(FFI_G(tags)); in ZEND_METHOD()
3963 FFI_G(tags) = NULL; in ZEND_METHOD()
3965 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3966 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3967 efree(FFI_G(symbols)); in ZEND_METHOD()
3968 FFI_G(symbols) = NULL; in ZEND_METHOD()
3978 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3981 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3982 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3983 efree(FFI_G(symbols)); in ZEND_METHOD()
3984 FFI_G(symbols) = NULL; in ZEND_METHOD()
3986 FFI_G(symbols) = NULL; in ZEND_METHOD()
3987 FFI_G(tags) = NULL; in ZEND_METHOD()
4119 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
4120 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
4122 FFI_G(symbols) = NULL; in ZEND_METHOD()
4123 FFI_G(tags) = NULL; in ZEND_METHOD()
4125 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
4126 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
4128 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
4132 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
4133 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
4134 efree(FFI_G(tags)); in ZEND_METHOD()
4135 FFI_G(tags) = NULL; in ZEND_METHOD()
4137 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
4138 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
4139 efree(FFI_G(symbols)); in ZEND_METHOD()
4140 FFI_G(symbols) = NULL; in ZEND_METHOD()
4145 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
4148 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
4149 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
4150 efree(FFI_G(symbols)); in ZEND_METHOD()
4151 FFI_G(symbols) = NULL; in ZEND_METHOD()
4153 FFI_G(symbols) = NULL; in ZEND_METHOD()
4154 FFI_G(tags) = NULL; in ZEND_METHOD()
5253 FFI_G(restriction) = ZEND_FFI_PRELOAD; in ZEND_INI_MH()
5255 FFI_G(restriction) = (zend_ffi_api_restriction)zend_ini_parse_bool(new_value); in ZEND_INI_MH()
5263 if (FFI_G(restriction) == ZEND_FFI_PRELOAD) { in ZEND_INI_DISP()
5265 } else if (FFI_G(restriction) == ZEND_FFI_ENABLED) { in ZEND_INI_DISP()
5412 FFI_G(is_cli) = strcmp(sapi_module.name, "cli") == 0;
5555 if (FFI_G(preload)) {
5556 return zend_ffi_preload(FFI_G(preload));
5566 if (FFI_G(callbacks)) {
5567 zend_hash_destroy(FFI_G(callbacks));
5568 efree(FFI_G(callbacks));
5569 FFI_G(callbacks) = NULL;
5571 if (FFI_G(weak_types)) {
5573 fprintf(stderr, "WeakTypes: %d\n", zend_hash_num_elements(FFI_G(weak_types)));
5575 zend_hash_destroy(FFI_G(weak_types));
5576 efree(FFI_G(weak_types));
5577 FFI_G(weak_types) = NULL;
5729 LONGJMP(FFI_G(bailout), FAILURE);
5813 zend_ffi_parser_error("Unsupported type _Complex at line %d", FFI_G(line));
5816 zend_ffi_parser_error("Unsupported type specifier combination at line %d", FFI_G(line));
5830 if (FFI_G(symbols)) {
5831 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5836 type = zend_hash_str_find_ptr(&FFI_G(types), name, name_len);
5849 if (FFI_G(symbols)) {
5850 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5859 type = zend_hash_str_find_ptr(&FFI_G(types), name, name_len);
5864 zend_ffi_parser_error("Undefined C type \"%.*s\" at line %d", name_len, name, FFI_G(line));
5872 if (UNEXPECTED(FFI_G(attribute_parsing))) {
5877 } else if (FFI_G(symbols)) {
5878 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5910 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
5912 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_ENUM_ATTRS);
5978 …rser_error("Enumerator value \"%.*s\" must be an integer at line %d", name_len, name, FFI_G(line));
5983 …zend_ffi_parser_error("Overflow in enumeration values \"%.*s\" at line %d", name_len, name, FFI_G(…
6021 if (!FFI_G(symbols)) {
6022 FFI_G(symbols) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6023 …zend_hash_init(FFI_G(symbols), 0, NULL, FFI_G(persistent) ? zend_ffi_symbol_hash_persistent_dtor :…
6025 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
6027 zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
6029 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6033 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6040 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6042 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_STRUCT_ATTRS);
6050 …(&type->record.fields, 0, NULL, FFI_G(persistent) ? zend_ffi_field_hash_persistent_dtor :zend_ffi_…
6065 … zend_ffi_throw_parser_error("Flexible array member not at end of struct at line %d", FFI_G(line));
6076 …zend_ffi_throw_parser_error("Struct/union can't contain an instance of itself at line %d", FFI_G(l…
6082 zend_ffi_throw_parser_error("Flexible array member in union at line %d", FFI_G(line));
6101 LONGJMP(FFI_G(bailout), FAILURE);
6104 field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6128 pefree(field, FFI_G(persistent));
6129 zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
6146 zend_ffi_parser_error("Declaration does not declare anything at line %d", FFI_G(line));
6156 LONGJMP(FFI_G(bailout), FAILURE);
6165 zend_ffi_field *new_field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6182 pefree(new_field, FFI_G(persistent));
6183 zend_ffi_parser_error("Duplicate field name \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
6213 LONGJMP(FFI_G(bailout), FAILURE);
6218 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6224 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6228 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6233 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6239 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6244 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6248 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6251 field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6295 pefree(field, FFI_G(persistent));
6296 zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
6321 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6323 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_POINTER_ATTRS);
6329 LONGJMP(FFI_G(bailout), FAILURE);
6342 zend_ffi_throw_parser_error("Array of functions is not allowed at line %d", FFI_G(line));
6345 …zend_ffi_throw_parser_error("Only the leftmost array can be undimensioned at line %d", FFI_G(line)…
6371 zend_ffi_parser_error("Unsupported array index type at line %d", FFI_G(line));
6376 zend_ffi_parser_error("Negative array index at line %d", FFI_G(line));
6382 LONGJMP(FFI_G(bailout), FAILURE);
6385 type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6387 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_ARRAY_ATTRS);
6402 zend_ffi_throw_parser_error("Function returning function is not allowed at line %d", FFI_G(line));
6405 zend_ffi_throw_parser_error("Function returning array is not allowed at line %d", FFI_G(line));
6431 pefree(args, FFI_G(persistent));
6432 zend_ffi_parser_error("void type is not allowed at line %d", FFI_G(line));
6441 pefree(args, FFI_G(persistent));
6461 pefree(args, FFI_G(persistent));
6462 …ble is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line));
6474 pefree(args, FFI_G(persistent));
6476 LONGJMP(FFI_G(bailout), FAILURE);
6479 type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6481 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_FUNC_ATTRS);
6535 pefree(args, FFI_G(persistent));
6539 zend_ffi_parser_error("Unsupported calling convention line %d", FFI_G(line));
6555 *args = pemalloc(sizeof(HashTable), FFI_G(persistent));
6556 zend_hash_init(*args, 0, NULL, zend_ffi_type_hash_dtor, FFI_G(persistent));
6565 zend_ffi_type *new_type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6567 new_type->attr = FFI_G(default_type_attr) | (type->attr & ZEND_FFI_POINTER_ATTRS);
6574 zend_ffi_type *new_type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6576 new_type->attr = FFI_G(default_type_attr);
6585 pefree(*args, FFI_G(persistent));
6587 LONGJMP(FFI_G(bailout), FAILURE);
6597 if (!FFI_G(symbols)) {
6598 FFI_G(symbols) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6599 …zend_hash_init(FFI_G(symbols), 0, NULL, FFI_G(persistent) ? zend_ffi_symbol_hash_persistent_dtor :…
6602 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
6632 zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
6637 LONGJMP(FFI_G(bailout), FAILURE);
6643 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6646 type->attr |= FFI_G(default_type_attr);
6651 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6656 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6663 LONGJMP(FFI_G(bailout), FAILURE);
6667 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6672 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6687 if (!FFI_G(tags)) {
6688 FFI_G(tags) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6689 …zend_hash_init(FFI_G(tags), 0, NULL, FFI_G(persistent) ? zend_ffi_tag_hash_persistent_dtor : zend_…
6691 tag = zend_hash_str_find_ptr(FFI_G(tags), name, name_len);
6697 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6700 … zend_ffi_parser_error("Redefinition of \"struct %.*s\" at line %d", name_len, name, FFI_G(line));
6705 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6708 zend_ffi_parser_error("Redefinition of \"union %.*s\" at line %d", name_len, name, FFI_G(line));
6713 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6716 zend_ffi_parser_error("Redefinition of \"enum %.*s\" at line %d", name_len, name, FFI_G(line));
6728 zend_ffi_tag *tag = pemalloc(sizeof(zend_ffi_tag), FFI_G(persistent));
6729 zend_string *tag_name = zend_string_init(name, name_len, FFI_G(persistent));
6754 zend_hash_add_new_ptr(FFI_G(tags), tag_name, tag);
6763 zend_ffi_parser_error("Multiple calling convention specifiers at line %d", FFI_G(line));
6859 zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
6914 zend_ffi_parser_error("Incorrect \"regparam\" value at line %d", FFI_G(line));
6923 zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
6980 zend_ffi_parser_error("Unsupported \"mode\" value at line %d", FFI_G(line));
6983 zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
6999 zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
7060 LONGJMP(FFI_G(bailout), FAILURE);