com php-src: Fix test case for Windows: ext/ffi/tests/bug78714.phpt

From: Date: Mon, 11 Nov 2019 11:49:32 +0000
Subject: com php-src: Fix test case for Windows: ext/ffi/tests/bug78714.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-109236@lists.php.net to get a copy of this message
Commit: ce047e60911400c97d585a09a69770898aa4cf78 Author: Christoph M. Becker <cmbecker69@gmx.de> Mon, 11 Nov 2019 12:48:17 +0100 Parents: 60081ca20d5701111de5f94ae64909b1cc265f1e Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ce047e60911400c97d585a09a69770898aa4cf78 Log: Fix test case for Windows Changed paths: M ext/ffi/tests/bug78714.phpt Diff: diff --git a/ext/ffi/tests/bug78714.phpt b/ext/ffi/tests/bug78714.phpt index c99607c11c4..1acac06ffeb 100644 --- a/ext/ffi/tests/bug78714.phpt +++ b/ext/ffi/tests/bug78714.phpt @@ -6,7 +6,13 @@ Bug #78714 (funcs returning pointer can't use call convention spec) ffi.enable=1 --FILE-- <?php -$ffi = FFI::cdef('char * __cdecl get_zend_version(void);'); +$def = 'char * __cdecl get_zend_version(void);'; +if (substr(PHP_OS, 0, 3) != 'WIN') { + $ffi = FFI::cdef($def); +} else { + $dll = 'php7' . (PHP_ZTS ? 'ts' : '') . (PHP_DEBUG ? '_debug' : '') . '.dll'; + $ffi = FFI::cdef($def, $dll); +} echo substr(FFI::string($ffi->get_zend_version()), 0, 4) . "\n"; ?> --EXPECT--

« previous php.cvs (#109236) next »