Skip to content

Commit ecd0c5b

Browse files
committed
Fixed bug #78714 (funcs returning pointer can't use call convention spec)
1 parent ce41795 commit ecd0c5b

File tree

4 files changed

+350
-324
lines changed

4 files changed

+350
-324
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ PHP NEWS
66
. Fixed bug #78768 (redefinition of typedef zend_property_info). (Nikita)
77
. Fixed bug #78788 (./configure generates invalid php_version.h). (max)
88

9+
- FFI:
10+
. Fixed bug #78714 (funcs returning pointer can't use call convention spec).
11+
(Dmitry)
12+
913
- Standard:
1014
. Fixed bug #77930 (stream_copy_to_stream should use mmap more often).
1115
(Nikita)

ext/ffi/ffi.g

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,6 @@ declaration_specifiers(zend_ffi_dcl *dcl):
127127
{dcl->flags |= ZEND_FFI_DCL_INLINE;}
128128
| "_Noreturn"
129129
{dcl->flags |= ZEND_FFI_DCL_NO_RETURN;}
130-
| "__cdecl"
131-
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_CDECL);}
132-
| "__stdcall"
133-
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_STDCALL);}
134-
| "__fastcall"
135-
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_FASTCALL);}
136-
| "__thiscall"
137-
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_THISCALL);}
138-
| "__vectorcall"
139-
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_VECTORCALL);}
140130
| "_Alignas"
141131
"("
142132
( &type_name_start
@@ -494,6 +484,16 @@ attributes(zend_ffi_dcl *dcl):
494484
)?
495485
)+
496486
")"
487+
| "__cdecl"
488+
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_CDECL);}
489+
| "__stdcall"
490+
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_STDCALL);}
491+
| "__fastcall"
492+
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_FASTCALL);}
493+
| "__thiscall"
494+
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_THISCALL);}
495+
| "__vectorcall"
496+
{zend_ffi_set_abi(dcl, ZEND_FFI_ABI_VECTORCALL);}
497497
)++
498498
;
499499

0 commit comments

Comments
 (0)