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

Simplify curl gc handlers (#18227)

Since these objects are final and have no dynamic properties, we don't
have to build a property table.
This commit is contained in:
Niels Dossche
2025-04-02 17:33:02 +02:00
committed by GitHub
parent 1f6fdde646
commit c10afa9643
2 changed files with 6 additions and 2 deletions

View File

@@ -546,7 +546,9 @@ static HashTable *curl_get_gc(zend_object *object, zval **table, int *n)
zend_get_gc_buffer_use(gc_buffer, table, n);
return zend_std_get_properties(object);
/* CurlHandle can never have properties as it's final and has strict-properties on.
* Avoid building a hash table. */
return NULL;
}
zend_result curl_cast_object(zend_object *obj, zval *result, int type)

View File

@@ -594,7 +594,9 @@ static HashTable *curl_multi_get_gc(zend_object *object, zval **table, int *n)
zend_get_gc_buffer_use(gc_buffer, table, n);
return zend_std_get_properties(object);
/* CurlMultiHandle can never have properties as it's final and has strict-properties on.
* Avoid building a hash table. */
return NULL;
}
static zend_object_handlers curl_multi_handlers;