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()
2956 if (EXPECTED(FFI_G(restriction) > ZEND_FFI_ENABLED)) { in zend_ffi_validate_api_restriction()
2957 ZEND_ASSERT(FFI_G(restriction) == ZEND_FFI_PRELOAD); in zend_ffi_validate_api_restriction()
2958 if (FFI_G(is_cli) in zend_ffi_validate_api_restriction()
2964 } else if (EXPECTED(FFI_G(restriction) == ZEND_FFI_ENABLED)) { in zend_ffi_validate_api_restriction()
3018 FFI_G(symbols) = NULL; in ZEND_METHOD()
3019 FFI_G(tags) = NULL; in ZEND_METHOD()
3023 FFI_G(default_type_attr) = ZEND_FFI_ATTR_STORED; in ZEND_METHOD()
3026 if (FFI_G(symbols)) { in ZEND_METHOD()
3027 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3028 efree(FFI_G(symbols)); in ZEND_METHOD()
3029 FFI_G(symbols) = NULL; in ZEND_METHOD()
3031 if (FFI_G(tags)) { in ZEND_METHOD()
3032 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3033 efree(FFI_G(tags)); in ZEND_METHOD()
3034 FFI_G(tags) = NULL; in ZEND_METHOD()
3039 if (FFI_G(symbols)) { in ZEND_METHOD()
3043 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in ZEND_METHOD()
3068 ffi->symbols = FFI_G(symbols); in ZEND_METHOD()
3069 ffi->tags = FFI_G(tags); in ZEND_METHOD()
3071 FFI_G(symbols) = NULL; in ZEND_METHOD()
3072 FFI_G(tags) = NULL; in ZEND_METHOD()
3233 if (FFI_G(symbols)) { in zend_ffi_cleanup_type()
3234 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(symbols), sym) { in zend_ffi_cleanup_type()
3238 if (FFI_G(tags)) { in zend_ffi_cleanup_type()
3239 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(tags), tag) { in zend_ffi_cleanup_type()
3248 if (!FFI_G(weak_types)) { in zend_ffi_remember_type()
3249 FFI_G(weak_types) = emalloc(sizeof(HashTable)); in zend_ffi_remember_type()
3250 zend_hash_init(FFI_G(weak_types), 0, NULL, zend_ffi_type_hash_dtor, 0); in zend_ffi_remember_type()
3254 zend_hash_next_index_insert_ptr(FFI_G(weak_types), ZEND_FFI_TYPE_MAKE_OWNED(type)); in zend_ffi_remember_type()
3311 FFI_G(symbols) = NULL; in zend_ffi_load()
3312 FFI_G(tags) = NULL; in zend_ffi_load()
3313 FFI_G(persistent) = preload; in zend_ffi_load()
3314 FFI_G(default_type_attr) = preload ? in zend_ffi_load()
3324 FFI_G(persistent) = 0; in zend_ffi_load()
3371 if (FFI_G(scopes)) { in zend_ffi_load()
3372 scope = zend_hash_str_find_ptr(FFI_G(scopes), scope_name, scope_name_len); in zend_ffi_load()
3376 if (FFI_G(symbols)) { in zend_ffi_load()
3377 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in zend_ffi_load()
3434 if (scope && scope->tags && FFI_G(tags)) { in zend_ffi_load()
3435 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), name, tag) { in zend_ffi_load()
3459 scope->symbols = FFI_G(symbols); in zend_ffi_load()
3460 scope->tags = FFI_G(tags); in zend_ffi_load()
3462 if (!FFI_G(scopes)) { in zend_ffi_load()
3463 FFI_G(scopes) = malloc(sizeof(HashTable)); in zend_ffi_load()
3464 zend_hash_init(FFI_G(scopes), 0, NULL, zend_ffi_scope_hash_dtor, 1); in zend_ffi_load()
3467 zend_hash_str_add_ptr(FFI_G(scopes), scope_name, scope_name_len, scope); in zend_ffi_load()
3469 if (FFI_G(symbols)) { in zend_ffi_load()
3471 scope->symbols = FFI_G(symbols); in zend_ffi_load()
3472 FFI_G(symbols) = NULL; in zend_ffi_load()
3474 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in zend_ffi_load()
3480 FFI_G(symbols)->pDestructor = NULL; in zend_ffi_load()
3481 zend_hash_destroy(FFI_G(symbols)); in zend_ffi_load()
3484 if (FFI_G(tags)) { in zend_ffi_load()
3486 scope->tags = FFI_G(tags); in zend_ffi_load()
3487 FFI_G(tags) = NULL; in zend_ffi_load()
3489 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), name, tag) { in zend_ffi_load()
3495 FFI_G(tags)->pDestructor = NULL; in zend_ffi_load()
3496 zend_hash_destroy(FFI_G(tags)); in zend_ffi_load()
3512 ffi->symbols = FFI_G(symbols); in zend_ffi_load()
3513 ffi->tags = FFI_G(tags); in zend_ffi_load()
3517 FFI_G(symbols) = NULL; in zend_ffi_load()
3518 FFI_G(tags) = NULL; in zend_ffi_load()
3519 FFI_G(persistent) = 0; in zend_ffi_load()
3525 if (FFI_G(symbols)) { in zend_ffi_load()
3526 zend_hash_destroy(FFI_G(symbols)); in zend_ffi_load()
3527 pefree(FFI_G(symbols), preload); in zend_ffi_load()
3528 FFI_G(symbols) = NULL; in zend_ffi_load()
3530 if (FFI_G(tags)) { in zend_ffi_load()
3531 zend_hash_destroy(FFI_G(tags)); in zend_ffi_load()
3532 pefree(FFI_G(tags), preload); in zend_ffi_load()
3533 FFI_G(tags) = NULL; in zend_ffi_load()
3535 FFI_G(persistent) = 0; in zend_ffi_load()
3574 if (FFI_G(scopes)) { in ZEND_METHOD()
3575 scope = zend_hash_find_ptr(FFI_G(scopes), scope_name); in ZEND_METHOD()
3623 if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { in zend_ffi_validate_vla()
3624 …ser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); in zend_ffi_validate_vla()
3634 if (FFI_G(tags)) { in zend_ffi_validate_incomplete_type()
3638 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), key, tag) { in zend_ffi_validate_incomplete_type()
3641 zend_ffi_throw_parser_error("Incomplete enum \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3643 zend_ffi_throw_parser_error("Incomplete union \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3645 … zend_ffi_throw_parser_error("Incomplete struct \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3651 if (FFI_G(symbols)) { in zend_ffi_validate_incomplete_type()
3655 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), key, sym) { in zend_ffi_validate_incomplete_type()
3657 zend_ffi_throw_parser_error("Incomplete C type %s at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3662 zend_ffi_throw_parser_error("Incomplete type at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3665 zend_ffi_throw_parser_error("\"[]\" is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3667 } else if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { in zend_ffi_validate_incomplete_type()
3668 …ser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3678 zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_type()
3688 zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_var_type()
3700 LONGJMP(FFI_G(bailout), FAILURE); in zend_ffi_validate_type_name()
3750 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(tags), tag) { in zend_ffi_tags_cleanup()
3757 zend_hash_destroy(FFI_G(tags)); in zend_ffi_tags_cleanup()
3758 efree(FFI_G(tags)); in zend_ffi_tags_cleanup()
3803 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
3804 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
3806 FFI_G(symbols) = NULL; in ZEND_METHOD()
3807 FFI_G(tags) = NULL; in ZEND_METHOD()
3809 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
3810 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
3812 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
3816 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3817 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3818 efree(FFI_G(tags)); in ZEND_METHOD()
3819 FFI_G(tags) = NULL; in ZEND_METHOD()
3821 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3822 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3823 efree(FFI_G(symbols)); in ZEND_METHOD()
3824 FFI_G(symbols) = NULL; in ZEND_METHOD()
3834 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3837 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3838 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3839 efree(FFI_G(symbols)); in ZEND_METHOD()
3840 FFI_G(symbols) = NULL; in ZEND_METHOD()
3842 FFI_G(symbols) = NULL; in ZEND_METHOD()
3843 FFI_G(tags) = NULL; in ZEND_METHOD()
3953 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
3954 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
3956 FFI_G(symbols) = NULL; in ZEND_METHOD()
3957 FFI_G(tags) = NULL; in ZEND_METHOD()
3959 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
3960 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
3962 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
3966 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3967 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3968 efree(FFI_G(tags)); in ZEND_METHOD()
3969 FFI_G(tags) = NULL; in ZEND_METHOD()
3971 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3972 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3973 efree(FFI_G(symbols)); in ZEND_METHOD()
3974 FFI_G(symbols) = NULL; in ZEND_METHOD()
3984 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3987 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3988 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3989 efree(FFI_G(symbols)); in ZEND_METHOD()
3990 FFI_G(symbols) = NULL; in ZEND_METHOD()
3992 FFI_G(symbols) = NULL; in ZEND_METHOD()
3993 FFI_G(tags) = NULL; in ZEND_METHOD()
4125 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
4126 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
4128 FFI_G(symbols) = NULL; in ZEND_METHOD()
4129 FFI_G(tags) = NULL; in ZEND_METHOD()
4131 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
4132 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
4134 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
4138 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
4139 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
4140 efree(FFI_G(tags)); in ZEND_METHOD()
4141 FFI_G(tags) = NULL; in ZEND_METHOD()
4143 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
4144 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
4145 efree(FFI_G(symbols)); in ZEND_METHOD()
4146 FFI_G(symbols) = NULL; in ZEND_METHOD()
4151 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
4154 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
4155 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
4156 efree(FFI_G(symbols)); in ZEND_METHOD()
4157 FFI_G(symbols) = NULL; in ZEND_METHOD()
4159 FFI_G(symbols) = NULL; in ZEND_METHOD()
4160 FFI_G(tags) = NULL; in ZEND_METHOD()
5259 FFI_G(restriction) = ZEND_FFI_PRELOAD; in ZEND_INI_MH()
5261 FFI_G(restriction) = (zend_ffi_api_restriction)zend_ini_parse_bool(new_value); in ZEND_INI_MH()
5269 if (FFI_G(restriction) == ZEND_FFI_PRELOAD) { in ZEND_INI_DISP()
5271 } else if (FFI_G(restriction) == ZEND_FFI_ENABLED) { in ZEND_INI_DISP()
5418 FFI_G(is_cli) = strcmp(sapi_module.name, "cli") == 0;
5561 if (FFI_G(preload)) {
5562 return zend_ffi_preload(FFI_G(preload));
5572 if (FFI_G(callbacks)) {
5573 zend_hash_destroy(FFI_G(callbacks));
5574 efree(FFI_G(callbacks));
5575 FFI_G(callbacks) = NULL;
5577 if (FFI_G(weak_types)) {
5579 fprintf(stderr, "WeakTypes: %d\n", zend_hash_num_elements(FFI_G(weak_types)));
5581 zend_hash_destroy(FFI_G(weak_types));
5582 efree(FFI_G(weak_types));
5583 FFI_G(weak_types) = NULL;
5735 LONGJMP(FFI_G(bailout), FAILURE);
5819 zend_ffi_parser_error("Unsupported type _Complex at line %d", FFI_G(line));
5822 zend_ffi_parser_error("Unsupported type specifier combination at line %d", FFI_G(line));
5836 if (FFI_G(symbols)) {
5837 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5842 type = zend_hash_str_find_ptr(&FFI_G(types), name, name_len);
5855 if (FFI_G(symbols)) {
5856 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5865 type = zend_hash_str_find_ptr(&FFI_G(types), name, name_len);
5870 zend_ffi_parser_error("Undefined C type \"%.*s\" at line %d", name_len, name, FFI_G(line));
5878 if (UNEXPECTED(FFI_G(attribute_parsing))) {
5883 } else if (FFI_G(symbols)) {
5884 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5916 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
5918 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_ENUM_ATTRS);
5984 …rser_error("Enumerator value \"%.*s\" must be an integer at line %d", name_len, name, FFI_G(line));
5989 …zend_ffi_parser_error("Overflow in enumeration values \"%.*s\" at line %d", name_len, name, FFI_G(…
6027 if (!FFI_G(symbols)) {
6028 FFI_G(symbols) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6029 …zend_hash_init(FFI_G(symbols), 0, NULL, FFI_G(persistent) ? zend_ffi_symbol_hash_persistent_dtor :…
6031 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
6033 zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
6035 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6039 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6046 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6048 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_STRUCT_ATTRS);
6056 …(&type->record.fields, 0, NULL, FFI_G(persistent) ? zend_ffi_field_hash_persistent_dtor :zend_ffi_…
6071 … zend_ffi_throw_parser_error("Flexible array member not at end of struct at line %d", FFI_G(line));
6082 …zend_ffi_throw_parser_error("Struct/union can't contain an instance of itself at line %d", FFI_G(l…
6088 zend_ffi_throw_parser_error("Flexible array member in union at line %d", FFI_G(line));
6107 LONGJMP(FFI_G(bailout), FAILURE);
6110 field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6134 pefree(field, FFI_G(persistent));
6135 zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
6152 zend_ffi_parser_error("Declaration does not declare anything at line %d", FFI_G(line));
6162 LONGJMP(FFI_G(bailout), FAILURE);
6171 zend_ffi_field *new_field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6188 pefree(new_field, FFI_G(persistent));
6189 zend_ffi_parser_error("Duplicate field name \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
6219 LONGJMP(FFI_G(bailout), FAILURE);
6224 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6230 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6234 … 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));
6245 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6250 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6254 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6257 field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6301 pefree(field, FFI_G(persistent));
6302 zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
6327 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6329 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_POINTER_ATTRS);
6335 LONGJMP(FFI_G(bailout), FAILURE);
6348 zend_ffi_throw_parser_error("Array of functions is not allowed at line %d", FFI_G(line));
6351 …zend_ffi_throw_parser_error("Only the leftmost array can be undimensioned at line %d", FFI_G(line)…
6377 zend_ffi_parser_error("Unsupported array index type at line %d", FFI_G(line));
6382 zend_ffi_parser_error("Negative array index at line %d", FFI_G(line));
6388 LONGJMP(FFI_G(bailout), FAILURE);
6391 type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6393 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_ARRAY_ATTRS);
6408 zend_ffi_throw_parser_error("Function returning function is not allowed at line %d", FFI_G(line));
6411 zend_ffi_throw_parser_error("Function returning array is not allowed at line %d", FFI_G(line));
6437 pefree(args, FFI_G(persistent));
6438 zend_ffi_parser_error("void type is not allowed at line %d", FFI_G(line));
6447 pefree(args, FFI_G(persistent));
6467 pefree(args, FFI_G(persistent));
6468 …ble is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line));
6480 pefree(args, FFI_G(persistent));
6482 LONGJMP(FFI_G(bailout), FAILURE);
6485 type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6487 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_FUNC_ATTRS);
6541 pefree(args, FFI_G(persistent));
6545 zend_ffi_parser_error("Unsupported calling convention line %d", FFI_G(line));
6561 *args = pemalloc(sizeof(HashTable), FFI_G(persistent));
6562 zend_hash_init(*args, 0, NULL, zend_ffi_type_hash_dtor, FFI_G(persistent));
6571 zend_ffi_type *new_type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6573 new_type->attr = FFI_G(default_type_attr) | (type->attr & ZEND_FFI_POINTER_ATTRS);
6580 zend_ffi_type *new_type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6582 new_type->attr = FFI_G(default_type_attr);
6591 pefree(*args, FFI_G(persistent));
6593 LONGJMP(FFI_G(bailout), FAILURE);
6603 if (!FFI_G(symbols)) {
6604 FFI_G(symbols) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6605 …zend_hash_init(FFI_G(symbols), 0, NULL, FFI_G(persistent) ? zend_ffi_symbol_hash_persistent_dtor :…
6608 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
6638 zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
6643 LONGJMP(FFI_G(bailout), FAILURE);
6649 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6652 type->attr |= FFI_G(default_type_attr);
6657 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6662 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6669 LONGJMP(FFI_G(bailout), FAILURE);
6673 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6678 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6693 if (!FFI_G(tags)) {
6694 FFI_G(tags) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6695 …zend_hash_init(FFI_G(tags), 0, NULL, FFI_G(persistent) ? zend_ffi_tag_hash_persistent_dtor : zend_…
6697 tag = zend_hash_str_find_ptr(FFI_G(tags), name, name_len);
6703 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6706 … zend_ffi_parser_error("Redefinition of \"struct %.*s\" at line %d", name_len, name, FFI_G(line));
6711 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6714 zend_ffi_parser_error("Redefinition of \"union %.*s\" at line %d", name_len, name, FFI_G(line));
6719 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6722 zend_ffi_parser_error("Redefinition of \"enum %.*s\" at line %d", name_len, name, FFI_G(line));
6734 zend_ffi_tag *tag = pemalloc(sizeof(zend_ffi_tag), FFI_G(persistent));
6735 zend_string *tag_name = zend_string_init(name, name_len, FFI_G(persistent));
6760 zend_hash_add_new_ptr(FFI_G(tags), tag_name, tag);
6769 zend_ffi_parser_error("Multiple calling convention specifiers at line %d", FFI_G(line));
6865 zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
6920 zend_ffi_parser_error("Incorrect \"regparam\" value at line %d", FFI_G(line));
6929 zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
6986 zend_ffi_parser_error("Unsupported \"mode\" value at line %d", FFI_G(line));
6989 zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
7005 zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
7066 LONGJMP(FFI_G(bailout), FAILURE);