Skip to content

Commit 07d6dfb

Browse files
committed
Use zend_empty_array
No need to define our own `com_dotnet_object_properties` as empty hash, since we can use `zend_empty_array` instead as of PHP 7.3.0. Cf. <#3672 (comment)>.
1 parent 070f683 commit 07d6dfb

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

ext/com_dotnet/com_extension.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ PHP_MINIT_FUNCTION(com_dotnet)
293293
{
294294
zend_class_entry ce, *tmp;
295295

296-
zend_hash_init(&com_dotnet_object_properties, 0, NULL, NULL, 0);
297-
298296
php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU);
299297
php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU);
300298

ext/com_dotnet/com_handlers.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#include "php_com_dotnet_internal.h"
2828
#include "Zend/zend_exceptions.h"
2929

30-
const HashTable com_dotnet_object_properties;
31-
3230
static zval *com_property_read(zval *object, zval *member, int type, void **cahce_slot, zval *rv)
3331
{
3432
php_com_dotnet_object *obj;
@@ -231,7 +229,7 @@ static HashTable *com_properties_get(zval *object)
231229
* infinite recursion when the hash is displayed via var_dump().
232230
* Perhaps it is best to leave it un-implemented.
233231
*/
234-
return &com_dotnet_object_properties;
232+
return &zend_empty_array;
235233
}
236234

237235
static void function_dtor(zval *zv)

ext/com_dotnet/php_com_dotnet_internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
#include "zend_ts_hash.h"
3131

32-
extern const HashTable com_dotnet_object_properties;
33-
3432
typedef struct _php_com_dotnet_object {
3533
zend_object zo;
3634

0 commit comments

Comments
 (0)