|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-11-07 10:39 UTC] nikic@php.net
-Assigned To:
+Assigned To: dmitry
[2019-11-11 09:08 UTC] dmitry@php.net
[2019-11-11 09:08 UTC] dmitry@php.net
-Status: Assigned
+Status: Closed
[2019-11-11 09:09 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
Description: ------------ When declaring a function which returns a pointer, any calling convention specifier is not recognized at the proper position (at least the proper position for MSVC; not sure about other compilers). It appears to be possible to work around that issue by placing the calling convention specifier between the base type and the `*` (or even by placing it between `extern` and the base type), but we should support the proper order as well. This issue has been found by Alexander Lisachenko. Test script: --------------- <?php $ffi = FFI::cdef( 'char * __cdecl get_zend_version(void);', 'php7_debug.dll' ); echo FFI::string($ffi->get_zend_version()); Expected result: ---------------- Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies Actual result: -------------- Fatal error: Uncaught FFI\ParserException: unexpected '__cdecl' at line 1 in %s:4