Skip to content

Commit ce047e6

Browse files
committed
Fix test case for Windows
1 parent 60081ca commit ce047e6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/ffi/tests/bug78714.phpt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ Bug #78714 (funcs returning pointer can't use call convention spec)
66
ffi.enable=1
77
--FILE--
88
<?php
9-
$ffi = FFI::cdef('char * __cdecl get_zend_version(void);');
9+
$def = 'char * __cdecl get_zend_version(void);';
10+
if (substr(PHP_OS, 0, 3) != 'WIN') {
11+
$ffi = FFI::cdef($def);
12+
} else {
13+
$dll = 'php7' . (PHP_ZTS ? 'ts' : '') . (PHP_DEBUG ? '_debug' : '') . '.dll';
14+
$ffi = FFI::cdef($def, $dll);
15+
}
1016
echo substr(FFI::string($ffi->get_zend_version()), 0, 4) . "\n";
1117
?>
1218
--EXPECT--

0 commit comments

Comments
 (0)