1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Fix FFI tests on 8.3+
This commit is contained in:
Niels Dossche
2023-10-28 16:28:52 +02:00
3 changed files with 9 additions and 8 deletions

View File

@@ -6,9 +6,10 @@ ffi
ffi.enable=1
--FILE--
<?php
$cdata_value = \FFI::new('int');
$cdata_array = \FFI::new('int[1]');
$cdata_free = \FFI::new('int[1]', false);
$cdef = \FFI::cdef();
$cdata_value = $cdef->new('int');
$cdata_array = $cdef->new('int[1]');
$cdata_free = $cdef->new('int[1]', false);
\FFI::free($cdata_free);
$ref_value = \WeakReference::create($cdata_value);

View File

@@ -6,7 +6,7 @@ ffi
ffi.enable=1
--FILE--
<?php
$ctype = \FFI::type('int');
$ctype = \FFI::cdef()->type('int');
$ref = \WeakReference::create($ctype);
var_dump($ref->get() === $ctype);
unset($ctype);

View File

@@ -9,11 +9,11 @@ ffi.enable=1
$map = new WeakMap();
$ffi = \FFI::cdef('');
$cdata_value = \FFI::new('int');
$cdata_array = \FFI::new('int[1]');
$cdata_free = \FFI::new('int[1]', false);
$cdata_value = $ffi->new('int');
$cdata_array = $ffi->new('int[1]');
$cdata_free = $ffi->new('int[1]', false);
\FFI::free($cdata_free);
$ctype = \FFI::type('int');
$ctype = $ffi->type('int');
$map[$ffi] = 'ffi';
$map[$cdata_value] = 'cdata_value';