@@ -60,29 +60,18 @@ ZEND_TSRMLS_CACHE_EXTERN()
6060
6161zend_object_handlers * phongo_get_std_object_handlers (void );
6262
63- #define PHONGO_RETURN_PROPS (is_temp , props ) \
64- if (!(is_temp)) { \
65- GC_ADDREF(props); \
66- } \
67- return props;
68-
69- #define PHONGO_GET_PROPERTY_HASH_INIT_PROPS (is_temp , intern , props , size ) \
70- do { \
71- if (!(intern)->php_properties) { \
72- ALLOC_HASHTABLE((intern)->php_properties); \
73- zend_hash_init((intern)->php_properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
74- } \
75- if (is_temp) { \
76- (props) = zend_array_dup((intern)->php_properties); \
77- } else { \
78- (props) = zend_array_dup((intern)->php_properties); \
79- if ((intern)->properties) { \
80- HashTable* __tmp = (intern)->properties; \
81- (intern)->properties = NULL; \
82- zend_hash_release(__tmp); \
83- } \
84- (intern)->properties = (props); \
85- } \
63+ #define PHONGO_GET_PROPERTY_HASH_INIT_PROPS (is_temp , intern , props , size ) \
64+ do { \
65+ if (is_temp) { \
66+ ALLOC_HASHTABLE(props); \
67+ zend_hash_init((props), (size), NULL, ZVAL_PTR_DTOR, 0); \
68+ } else if ((intern)->properties) { \
69+ (props) = (intern)->properties; \
70+ } else { \
71+ ALLOC_HASHTABLE(props); \
72+ zend_hash_init((props), (size), NULL, ZVAL_PTR_DTOR, 0); \
73+ (intern)->properties = (props); \
74+ } \
8675 } while (0)
8776
8877#define PHONGO_GET_PROPERTY_HASH_FREE_PROPS (is_temp , props ) \
0 commit comments