Lines Matching refs:FFI_G

1073 	if (!FFI_G(callbacks)) {  in zend_ffi_create_callback()
1074 FFI_G(callbacks) = emalloc(sizeof(HashTable)); in zend_ffi_create_callback()
1075 zend_hash_init(FFI_G(callbacks), 0, NULL, zend_ffi_callback_hash_dtor, 0); in zend_ffi_create_callback()
1077 zend_hash_next_index_insert_ptr(FFI_G(callbacks), callback_data); in zend_ffi_create_callback()
2934 if (EXPECTED(FFI_G(restriction) > ZEND_FFI_ENABLED)) { in zend_ffi_validate_api_restriction()
2935 ZEND_ASSERT(FFI_G(restriction) == ZEND_FFI_PRELOAD); in zend_ffi_validate_api_restriction()
2936 if (FFI_G(is_cli) in zend_ffi_validate_api_restriction()
2942 } else if (EXPECTED(FFI_G(restriction) == ZEND_FFI_ENABLED)) { in zend_ffi_validate_api_restriction()
2983 FFI_G(symbols) = NULL; in ZEND_METHOD()
2984 FFI_G(tags) = NULL; in ZEND_METHOD()
2988 FFI_G(default_type_attr) = ZEND_FFI_ATTR_STORED; in ZEND_METHOD()
2991 if (FFI_G(symbols)) { in ZEND_METHOD()
2992 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
2993 efree(FFI_G(symbols)); in ZEND_METHOD()
2994 FFI_G(symbols) = NULL; in ZEND_METHOD()
2996 if (FFI_G(tags)) { in ZEND_METHOD()
2997 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
2998 efree(FFI_G(tags)); in ZEND_METHOD()
2999 FFI_G(tags) = NULL; in ZEND_METHOD()
3004 if (FFI_G(symbols)) { in ZEND_METHOD()
3008 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in ZEND_METHOD()
3033 ffi->symbols = FFI_G(symbols); in ZEND_METHOD()
3034 ffi->tags = FFI_G(tags); in ZEND_METHOD()
3036 FFI_G(symbols) = NULL; in ZEND_METHOD()
3037 FFI_G(tags) = NULL; in ZEND_METHOD()
3198 if (FFI_G(symbols)) { in zend_ffi_cleanup_type()
3199 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(symbols), sym) { in zend_ffi_cleanup_type()
3203 if (FFI_G(tags)) { in zend_ffi_cleanup_type()
3204 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(tags), tag) { in zend_ffi_cleanup_type()
3213 if (!FFI_G(weak_types)) { in zend_ffi_remember_type()
3214 FFI_G(weak_types) = emalloc(sizeof(HashTable)); in zend_ffi_remember_type()
3215 zend_hash_init(FFI_G(weak_types), 0, NULL, zend_ffi_type_hash_dtor, 0); in zend_ffi_remember_type()
3219 zend_hash_next_index_insert_ptr(FFI_G(weak_types), ZEND_FFI_TYPE_MAKE_OWNED(type)); in zend_ffi_remember_type()
3276 FFI_G(symbols) = NULL; in zend_ffi_load()
3277 FFI_G(tags) = NULL; in zend_ffi_load()
3278 FFI_G(persistent) = preload; in zend_ffi_load()
3279 FFI_G(default_type_attr) = preload ? in zend_ffi_load()
3289 FFI_G(persistent) = 0; in zend_ffi_load()
3325 if (FFI_G(scopes)) { in zend_ffi_load()
3326 scope = zend_hash_str_find_ptr(FFI_G(scopes), scope_name, scope_name_len); in zend_ffi_load()
3330 if (FFI_G(symbols)) { in zend_ffi_load()
3331 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in zend_ffi_load()
3388 if (scope && scope->tags && FFI_G(tags)) { in zend_ffi_load()
3389 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), name, tag) { in zend_ffi_load()
3413 scope->symbols = FFI_G(symbols); in zend_ffi_load()
3414 scope->tags = FFI_G(tags); in zend_ffi_load()
3416 if (!FFI_G(scopes)) { in zend_ffi_load()
3417 FFI_G(scopes) = malloc(sizeof(HashTable)); in zend_ffi_load()
3418 zend_hash_init(FFI_G(scopes), 0, NULL, zend_ffi_scope_hash_dtor, 1); in zend_ffi_load()
3421 zend_hash_str_add_ptr(FFI_G(scopes), scope_name, scope_name_len, scope); in zend_ffi_load()
3423 if (FFI_G(symbols)) { in zend_ffi_load()
3425 scope->symbols = FFI_G(symbols); in zend_ffi_load()
3426 FFI_G(symbols) = NULL; in zend_ffi_load()
3428 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), name, sym) { in zend_ffi_load()
3434 FFI_G(symbols)->pDestructor = NULL; in zend_ffi_load()
3435 zend_hash_destroy(FFI_G(symbols)); in zend_ffi_load()
3438 if (FFI_G(tags)) { in zend_ffi_load()
3440 scope->tags = FFI_G(tags); in zend_ffi_load()
3441 FFI_G(tags) = NULL; in zend_ffi_load()
3443 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), name, tag) { in zend_ffi_load()
3449 FFI_G(tags)->pDestructor = NULL; in zend_ffi_load()
3450 zend_hash_destroy(FFI_G(tags)); in zend_ffi_load()
3466 ffi->symbols = FFI_G(symbols); in zend_ffi_load()
3467 ffi->tags = FFI_G(tags); in zend_ffi_load()
3471 FFI_G(symbols) = NULL; in zend_ffi_load()
3472 FFI_G(tags) = NULL; in zend_ffi_load()
3473 FFI_G(persistent) = 0; in zend_ffi_load()
3479 if (FFI_G(symbols)) { in zend_ffi_load()
3480 zend_hash_destroy(FFI_G(symbols)); in zend_ffi_load()
3481 pefree(FFI_G(symbols), preload); in zend_ffi_load()
3482 FFI_G(symbols) = NULL; in zend_ffi_load()
3484 if (FFI_G(tags)) { in zend_ffi_load()
3485 zend_hash_destroy(FFI_G(tags)); in zend_ffi_load()
3486 pefree(FFI_G(tags), preload); in zend_ffi_load()
3487 FFI_G(tags) = NULL; in zend_ffi_load()
3489 FFI_G(persistent) = 0; in zend_ffi_load()
3528 if (FFI_G(scopes)) { in ZEND_METHOD()
3529 scope = zend_hash_find_ptr(FFI_G(scopes), scope_name); in ZEND_METHOD()
3577 if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { in zend_ffi_validate_vla()
3578 …ser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); in zend_ffi_validate_vla()
3588 if (FFI_G(tags)) { in zend_ffi_validate_incomplete_type()
3592 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(tags), key, tag) { in zend_ffi_validate_incomplete_type()
3595 zend_ffi_throw_parser_error("Incomplete enum \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3597 zend_ffi_throw_parser_error("Incomplete union \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3599 … zend_ffi_throw_parser_error("Incomplete struct \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3605 if (FFI_G(symbols)) { in zend_ffi_validate_incomplete_type()
3609 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(FFI_G(symbols), key, sym) { in zend_ffi_validate_incomplete_type()
3611 zend_ffi_throw_parser_error("Incomplete C type %s at line %d", ZSTR_VAL(key), FFI_G(line)); in zend_ffi_validate_incomplete_type()
3616 zend_ffi_throw_parser_error("Incomplete type at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3619 zend_ffi_throw_parser_error("\"[]\" is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3621 } else if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { in zend_ffi_validate_incomplete_type()
3622 …ser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); in zend_ffi_validate_incomplete_type()
3632 zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_type()
3642 zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line)); in zend_ffi_validate_var_type()
3654 LONGJMP(FFI_G(bailout), FAILURE); in zend_ffi_validate_type_name()
3704 ZEND_HASH_MAP_FOREACH_PTR(FFI_G(tags), tag) { in zend_ffi_tags_cleanup()
3711 zend_hash_destroy(FFI_G(tags)); in zend_ffi_tags_cleanup()
3712 efree(FFI_G(tags)); in zend_ffi_tags_cleanup()
3749 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
3750 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
3752 FFI_G(symbols) = NULL; in ZEND_METHOD()
3753 FFI_G(tags) = NULL; in ZEND_METHOD()
3755 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
3756 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
3758 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
3762 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3763 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3764 efree(FFI_G(tags)); in ZEND_METHOD()
3765 FFI_G(tags) = NULL; in ZEND_METHOD()
3767 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3768 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3769 efree(FFI_G(symbols)); in ZEND_METHOD()
3770 FFI_G(symbols) = NULL; in ZEND_METHOD()
3780 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3783 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3784 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3785 efree(FFI_G(symbols)); in ZEND_METHOD()
3786 FFI_G(symbols) = NULL; in ZEND_METHOD()
3788 FFI_G(symbols) = NULL; in ZEND_METHOD()
3789 FFI_G(tags) = NULL; in ZEND_METHOD()
3891 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
3892 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
3894 FFI_G(symbols) = NULL; in ZEND_METHOD()
3895 FFI_G(tags) = NULL; in ZEND_METHOD()
3897 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
3898 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
3900 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
3904 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3905 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
3906 efree(FFI_G(tags)); in ZEND_METHOD()
3907 FFI_G(tags) = NULL; in ZEND_METHOD()
3909 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3910 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3911 efree(FFI_G(symbols)); in ZEND_METHOD()
3912 FFI_G(symbols) = NULL; in ZEND_METHOD()
3922 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
3925 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
3926 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
3927 efree(FFI_G(symbols)); in ZEND_METHOD()
3928 FFI_G(symbols) = NULL; in ZEND_METHOD()
3930 FFI_G(symbols) = NULL; in ZEND_METHOD()
3931 FFI_G(tags) = NULL; in ZEND_METHOD()
4055 FFI_G(symbols) = ffi->symbols; in ZEND_METHOD()
4056 FFI_G(tags) = ffi->tags; in ZEND_METHOD()
4058 FFI_G(symbols) = NULL; in ZEND_METHOD()
4059 FFI_G(tags) = NULL; in ZEND_METHOD()
4061 bool clean_symbols = FFI_G(symbols) == NULL; in ZEND_METHOD()
4062 bool clean_tags = FFI_G(tags) == NULL; in ZEND_METHOD()
4064 FFI_G(default_type_attr) = 0; in ZEND_METHOD()
4068 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
4069 zend_hash_destroy(FFI_G(tags)); in ZEND_METHOD()
4070 efree(FFI_G(tags)); in ZEND_METHOD()
4071 FFI_G(tags) = NULL; in ZEND_METHOD()
4073 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
4074 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
4075 efree(FFI_G(symbols)); in ZEND_METHOD()
4076 FFI_G(symbols) = NULL; in ZEND_METHOD()
4081 if (clean_tags && FFI_G(tags)) { in ZEND_METHOD()
4084 if (clean_symbols && FFI_G(symbols)) { in ZEND_METHOD()
4085 zend_hash_destroy(FFI_G(symbols)); in ZEND_METHOD()
4086 efree(FFI_G(symbols)); in ZEND_METHOD()
4087 FFI_G(symbols) = NULL; in ZEND_METHOD()
4089 FFI_G(symbols) = NULL; in ZEND_METHOD()
4090 FFI_G(tags) = NULL; in ZEND_METHOD()
5183 FFI_G(restriction) = ZEND_FFI_PRELOAD; in ZEND_INI_MH()
5185 FFI_G(restriction) = (zend_ffi_api_restriction)zend_ini_parse_bool(new_value); in ZEND_INI_MH()
5193 if (FFI_G(restriction) == ZEND_FFI_PRELOAD) { in ZEND_INI_DISP()
5195 } else if (FFI_G(restriction) == ZEND_FFI_ENABLED) { in ZEND_INI_DISP()
5337 FFI_G(is_cli) = strcmp(sapi_module.name, "cli") == 0;
5477 if (FFI_G(preload)) {
5478 return zend_ffi_preload(FFI_G(preload));
5488 if (FFI_G(callbacks)) {
5489 zend_hash_destroy(FFI_G(callbacks));
5490 efree(FFI_G(callbacks));
5491 FFI_G(callbacks) = NULL;
5493 if (FFI_G(weak_types)) {
5495 fprintf(stderr, "WeakTypes: %d\n", zend_hash_num_elements(FFI_G(weak_types)));
5497 zend_hash_destroy(FFI_G(weak_types));
5498 efree(FFI_G(weak_types));
5499 FFI_G(weak_types) = NULL;
5651 LONGJMP(FFI_G(bailout), FAILURE);
5735 zend_ffi_parser_error("Unsupported type _Complex at line %d", FFI_G(line));
5738 zend_ffi_parser_error("Unsupported type specifier combination at line %d", FFI_G(line));
5752 if (FFI_G(symbols)) {
5753 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5758 type = zend_hash_str_find_ptr(&FFI_G(types), name, name_len);
5771 if (FFI_G(symbols)) {
5772 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5781 type = zend_hash_str_find_ptr(&FFI_G(types), name, name_len);
5786 zend_ffi_parser_error("Undefined C type \"%.*s\" at line %d", name_len, name, FFI_G(line));
5794 if (UNEXPECTED(FFI_G(attribute_parsing))) {
5799 } else if (FFI_G(symbols)) {
5800 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5832 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
5834 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_ENUM_ATTRS);
5900 …rser_error("Enumerator value \"%.*s\" must be an integer at line %d", name_len, name, FFI_G(line));
5905 …zend_ffi_parser_error("Overflow in enumeration values \"%.*s\" at line %d", name_len, name, FFI_G(…
5943 if (!FFI_G(symbols)) {
5944 FFI_G(symbols) = pemalloc(sizeof(HashTable), FFI_G(persistent));
5945 …zend_hash_init(FFI_G(symbols), 0, NULL, FFI_G(persistent) ? zend_ffi_symbol_hash_persistent_dtor :…
5947 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
5949 zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
5951 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
5955 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
5962 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
5964 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_STRUCT_ATTRS);
5972 …(&type->record.fields, 0, NULL, FFI_G(persistent) ? zend_ffi_field_hash_persistent_dtor :zend_ffi_…
5987 … zend_ffi_throw_parser_error("Flexible array member not at end of struct at line %d", FFI_G(line));
5998 …zend_ffi_throw_parser_error("Struct/union can't contain an instance of itself at line %d", FFI_G(l…
6004 zend_ffi_throw_parser_error("Flexible array member in union at line %d", FFI_G(line));
6023 LONGJMP(FFI_G(bailout), FAILURE);
6026 field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6050 pefree(field, FFI_G(persistent));
6051 zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
6068 zend_ffi_parser_error("Declaration does not declare anything at line %d", FFI_G(line));
6078 LONGJMP(FFI_G(bailout), FAILURE);
6087 zend_ffi_field *new_field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6104 pefree(new_field, FFI_G(persistent));
6105 zend_ffi_parser_error("Duplicate field name \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
6135 LONGJMP(FFI_G(bailout), FAILURE);
6140 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6146 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6150 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6155 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6161 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6166 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6170 … at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
6173 field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
6217 pefree(field, FFI_G(persistent));
6218 zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
6243 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6245 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_POINTER_ATTRS);
6251 LONGJMP(FFI_G(bailout), FAILURE);
6264 zend_ffi_throw_parser_error("Array of functions is not allowed at line %d", FFI_G(line));
6267 …zend_ffi_throw_parser_error("Only the leftmost array can be undimensioned at line %d", FFI_G(line)…
6293 zend_ffi_parser_error("Unsupported array index type at line %d", FFI_G(line));
6298 zend_ffi_parser_error("Negative array index at line %d", FFI_G(line));
6304 LONGJMP(FFI_G(bailout), FAILURE);
6307 type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6309 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_ARRAY_ATTRS);
6324 zend_ffi_throw_parser_error("Function returning function is not allowed at line %d", FFI_G(line));
6327 zend_ffi_throw_parser_error("Function returning array is not allowed at line %d", FFI_G(line));
6353 pefree(args, FFI_G(persistent));
6354 zend_ffi_parser_error("void type is not allowed at line %d", FFI_G(line));
6363 pefree(args, FFI_G(persistent));
6383 pefree(args, FFI_G(persistent));
6384 …ble is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line));
6396 pefree(args, FFI_G(persistent));
6398 LONGJMP(FFI_G(bailout), FAILURE);
6401 type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6403 type->attr = FFI_G(default_type_attr) | (dcl->attr & ZEND_FFI_FUNC_ATTRS);
6457 pefree(args, FFI_G(persistent));
6461 zend_ffi_parser_error("Unsupported calling convention line %d", FFI_G(line));
6477 *args = pemalloc(sizeof(HashTable), FFI_G(persistent));
6478 zend_hash_init(*args, 0, NULL, zend_ffi_type_hash_dtor, FFI_G(persistent));
6487 zend_ffi_type *new_type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6489 new_type->attr = FFI_G(default_type_attr) | (type->attr & ZEND_FFI_POINTER_ATTRS);
6496 zend_ffi_type *new_type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6498 new_type->attr = FFI_G(default_type_attr);
6507 pefree(*args, FFI_G(persistent));
6509 LONGJMP(FFI_G(bailout), FAILURE);
6519 if (!FFI_G(symbols)) {
6520 FFI_G(symbols) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6521 …zend_hash_init(FFI_G(symbols), 0, NULL, FFI_G(persistent) ? zend_ffi_symbol_hash_persistent_dtor :…
6524 sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
6554 zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
6559 LONGJMP(FFI_G(bailout), FAILURE);
6565 zend_ffi_type *type = pemalloc(sizeof(zend_ffi_type), FFI_G(persistent));
6568 type->attr |= FFI_G(default_type_attr);
6573 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6578 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6585 LONGJMP(FFI_G(bailout), FAILURE);
6589 sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
6594 zend_hash_str_add_new_ptr(FFI_G(symbols), name, name_len, sym);
6609 if (!FFI_G(tags)) {
6610 FFI_G(tags) = pemalloc(sizeof(HashTable), FFI_G(persistent));
6611 …zend_hash_init(FFI_G(tags), 0, NULL, FFI_G(persistent) ? zend_ffi_tag_hash_persistent_dtor : zend_…
6613 tag = zend_hash_str_find_ptr(FFI_G(tags), name, name_len);
6619 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6622 … zend_ffi_parser_error("Redefinition of \"struct %.*s\" at line %d", name_len, name, FFI_G(line));
6627 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6630 zend_ffi_parser_error("Redefinition of \"union %.*s\" at line %d", name_len, name, FFI_G(line));
6635 …zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(li…
6638 zend_ffi_parser_error("Redefinition of \"enum %.*s\" at line %d", name_len, name, FFI_G(line));
6650 zend_ffi_tag *tag = pemalloc(sizeof(zend_ffi_tag), FFI_G(persistent));
6651 zend_string *tag_name = zend_string_init(name, name_len, FFI_G(persistent));
6676 zend_hash_add_new_ptr(FFI_G(tags), tag_name, tag);
6685 zend_ffi_parser_error("Multiple calling convention specifiers at line %d", FFI_G(line));
6781 zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
6836 zend_ffi_parser_error("Incorrect \"regparam\" value at line %d", FFI_G(line));
6845 zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
6902 zend_ffi_parser_error("Unsupported \"mode\" value at line %d", FFI_G(line));
6905 zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
6921 zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
6982 LONGJMP(FFI_G(bailout), FAILURE);