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

@ -17,6 +17,10 @@ class check {
if (! is_array($extra)) {
$df=array_flip(get_declared_classes());
foreach($_original_classes as $class) unset($df[$class]);
// Filter out pointer wrappers such as SWIG/_p_int.
foreach(array_keys($df) as $class) {
if (preg_match('/^SWIG\\\\/', $class)) unset($df[$class]);
}
$extra=array_keys($df);
}
return $extra;
@ -202,10 +206,6 @@ class check {
return TRUE;
}
static function resource($a,$b,$message) {
return check::equal(get_resource_type($a), $b, $message);
}
static function isnull($a,$message) {
return check::equal($a,NULL,$message);
}