Use PHP objects instead of resources to wrap pointers

Pointer to member is currently still wrapped as a resource.
This commit is contained in:
Olly Betts 2021-04-21 15:40:35 +12:00
commit c705ef8f32
9 changed files with 107 additions and 118 deletions

View file

@ -2,7 +2,10 @@
require "tests.php";
require "callback.php";
// In 2.0.6 and earlier, the constant was misnamed.
if (gettype(callback::FOO_I_Cb_Ptr) !== 'resource') die("callback::FOO_I_Cb_Ptr not a resource\n");
check::equal(gettype(callback::FOO_I_Cb_Ptr), 'object', "callback::FOO_I_Cb_Ptr not an object");
check::equal(get_class(callback::FOO_I_Cb_Ptr), 'SWIG\_p_f_int__int', "callback::FOO_I_Cb_Ptr not expected class");
check::done();