@@ -3445,7 +3445,7 @@ static void zend_ffi_throw_parser_error(const char *format, ...) /* {{{ */
3445
3445
static int zend_ffi_validate_vla (zend_ffi_type * type ) /* {{{ */
3446
3446
{
3447
3447
if (!FFI_G (allow_vla ) && (type -> attr & ZEND_FFI_ATTR_VLA )) {
3448
- zend_ffi_throw_parser_error ("' [*]' not allowed in other than function prototype scope at line %d" , FFI_G (line ));
3448
+ zend_ffi_throw_parser_error ("\" [*]\" is not allowed in other than function prototype scope at line %d" , FFI_G (line ));
3449
3449
return FAILURE ;
3450
3450
}
3451
3451
return SUCCESS ;
@@ -3462,11 +3462,11 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
3462
3462
ZEND_HASH_FOREACH_STR_KEY_PTR (FFI_G (tags ), key , tag ) {
3463
3463
if (ZEND_FFI_TYPE (tag -> type ) == type ) {
3464
3464
if (type -> kind == ZEND_FFI_TYPE_ENUM ) {
3465
- zend_ffi_throw_parser_error ("Incomplete \" enum %s\" at line %d" , ZSTR_VAL (key ), FFI_G (line ));
3465
+ zend_ffi_throw_parser_error ("Incomplete enum %s at line %d" , ZSTR_VAL (key ), FFI_G (line ));
3466
3466
} else if (type -> attr & ZEND_FFI_ATTR_UNION ) {
3467
- zend_ffi_throw_parser_error ("Incomplete \" union %s\" at line %d" , ZSTR_VAL (key ), FFI_G (line ));
3467
+ zend_ffi_throw_parser_error ("Incomplete union %s at line %d" , ZSTR_VAL (key ), FFI_G (line ));
3468
3468
} else {
3469
- zend_ffi_throw_parser_error ("Incomplete \" struct %s\" at line %d" , ZSTR_VAL (key ), FFI_G (line ));
3469
+ zend_ffi_throw_parser_error ("Incomplete struct %s at line %d" , ZSTR_VAL (key ), FFI_G (line ));
3470
3470
}
3471
3471
return FAILURE ;
3472
3472
}
@@ -3486,10 +3486,10 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
3486
3486
zend_ffi_throw_parser_error ("Incomplete type at line %d" , FFI_G (line ));
3487
3487
return FAILURE ;
3488
3488
} else if (!allow_incomplete_array && (type -> attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY )) {
3489
- zend_ffi_throw_parser_error ("\"[]\" not allowed at line %d" , FFI_G (line ));
3489
+ zend_ffi_throw_parser_error ("\"[]\" is not allowed at line %d" , FFI_G (line ));
3490
3490
return FAILURE ;
3491
3491
} else if (!FFI_G (allow_vla ) && (type -> attr & ZEND_FFI_ATTR_VLA )) {
3492
- zend_ffi_throw_parser_error ("\"[*]\" not allowed in other than function prototype scope at line %d" , FFI_G (line ));
3492
+ zend_ffi_throw_parser_error ("\"[*]\" is not allowed in other than function prototype scope at line %d" , FFI_G (line ));
3493
3493
return FAILURE ;
3494
3494
}
3495
3495
return SUCCESS ;
@@ -3499,7 +3499,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
3499
3499
static int zend_ffi_validate_type (zend_ffi_type * type , zend_bool allow_incomplete_tag , zend_bool allow_incomplete_array ) /* {{{ */
3500
3500
{
3501
3501
if (type -> kind == ZEND_FFI_TYPE_VOID ) {
3502
- zend_ffi_throw_parser_error ("void type is not allowed at line %d" , FFI_G (line ));
3502
+ zend_ffi_throw_parser_error ("Type void is not allowed at line %d" , FFI_G (line ));
3503
3503
return FAILURE ;
3504
3504
}
3505
3505
return zend_ffi_validate_incomplete_type (type , allow_incomplete_tag , allow_incomplete_array );
@@ -3509,7 +3509,7 @@ static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplet
3509
3509
static int zend_ffi_validate_var_type (zend_ffi_type * type , zend_bool allow_incomplete_array ) /* {{{ */
3510
3510
{
3511
3511
if (type -> kind == ZEND_FFI_TYPE_FUNC ) {
3512
- zend_ffi_throw_parser_error ("function type is not allowed at line %d" , FFI_G (line ));
3512
+ zend_ffi_throw_parser_error ("Type function is not allowed at line %d" , FFI_G (line ));
3513
3513
return FAILURE ;
3514
3514
}
3515
3515
return zend_ffi_validate_type (type , 0 , allow_incomplete_array );
@@ -4040,7 +4040,7 @@ ZEND_METHOD(FFI, arrayType) /* {{{ */
4040
4040
zend_throw_error (zend_ffi_exception_ce , "Only the leftmost array can be undimensioned" );
4041
4041
RETURN_THROWS ();
4042
4042
} else if (type -> kind == ZEND_FFI_TYPE_VOID ) {
4043
- zend_throw_error (zend_ffi_exception_ce , "Array of ' void' is not allowed" );
4043
+ zend_throw_error (zend_ffi_exception_ce , "Array of void type is not allowed" );
4044
4044
RETURN_THROWS ();
4045
4045
} else if (type -> attr & ZEND_FFI_ATTR_INCOMPLETE_TAG ) {
4046
4046
zend_throw_error (zend_ffi_exception_ce , "Array of incomplete type is not allowed" );
@@ -5897,7 +5897,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n
5897
5897
zend_ffi_cleanup_dcl (dcl );
5898
5898
zend_hash_destroy (args );
5899
5899
pefree (args , FFI_G (persistent ));
5900
- zend_ffi_parser_error ("void type is not allowed at line %d" , FFI_G (line ));
5900
+ zend_ffi_parser_error ("Type void is not allowed at line %d" , FFI_G (line ));
5901
5901
return ;
5902
5902
} else {
5903
5903
no_args = 1 ;
@@ -5927,7 +5927,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n
5927
5927
zend_ffi_cleanup_dcl (dcl );
5928
5928
zend_hash_destroy (args );
5929
5929
pefree (args , FFI_G (persistent ));
5930
- zend_ffi_parser_error ("float/double type is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d" , i + 1 , FFI_G (line ));
5930
+ zend_ffi_parser_error ("Type float/double is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d" , i + 1 , FFI_G (line ));
5931
5931
return ;
5932
5932
}
5933
5933
} ZEND_HASH_FOREACH_END ();
0 commit comments