diff options
-rw-r--r-- | ext/com/COM.c | 4 | ||||
-rw-r--r-- | ext/com/conversion.c | 4 | ||||
-rw-r--r-- | ext/java/java.c | 2 | ||||
-rw-r--r-- | ext/mssql/php_mssql.c | 2 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 6 | ||||
-rw-r--r-- | ext/oracle/oracle.c | 2 | ||||
-rw-r--r-- | ext/rpc/com/com_wrapper.c | 4 | ||||
-rw-r--r-- | ext/rpc/com/conversion.c | 4 | ||||
-rw-r--r-- | ext/rpc/java/java.c | 2 | ||||
-rw-r--r-- | ext/standard/array.c | 2 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/ext/com/COM.c b/ext/com/COM.c index 15d0ec8e34..ce9201e144 100644 --- a/ext/com/COM.c +++ b/ext/com/COM.c @@ -1184,7 +1184,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer return_value.type = IS_OBJECT; return_value.value.obj.ce = &com_class_entry; - return_value.value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(return_value.value.obj.properties); zend_hash_init(return_value.value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ALLOC_ZVAL(handle); @@ -1225,7 +1225,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer return_value.type = IS_OBJECT; return_value.value.obj.ce = &com_class_entry; - return_value.value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(return_value.value.obj.properties); zend_hash_init(return_value.value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ALLOC_ZVAL(handle); diff --git a/ext/com/conversion.c b/ext/com/conversion.c index 92d1a2511d..d6eb0d286e 100644 --- a/ext/com/conversion.c +++ b/ext/com/conversion.c @@ -746,7 +746,7 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, Z_TYPE_P(pval_arg) = IS_OBJECT; pval_arg->value.obj.ce = &com_class_entry; - pval_arg->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(pval_arg->value.obj.properties); zend_hash_init(pval_arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ALLOC_ZVAL(handle); @@ -886,4 +886,4 @@ PHPAPI char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int per return C_str; } -#endif /* PHP_WIN32 */
\ No newline at end of file +#endif /* PHP_WIN32 */ diff --git a/ext/java/java.c b/ext/java/java.c index e8cb96a83f..27bfc1e14c 100644 --- a/ext/java/java.c +++ b/ext/java/java.c @@ -713,7 +713,7 @@ JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromObject if (presult->type != IS_OBJECT) { presult->type=IS_OBJECT; presult->value.obj.ce=&java_class_entry; - presult->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(presult->value.obj.properties); presult->is_ref=1; presult->refcount=1; zend_hash_init(presult->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 47f2ef1e44..68cd61fe4d 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -1917,7 +1917,7 @@ PHP_FUNCTION(mssql_bind) /* hashtable of binds */ if (! statement->binds) { - statement->binds = emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(statement->binds); zend_hash_init(statement->binds, 13, NULL, _mssql_bind_hash_dtor, 0); } diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 9089ab790f..6a43f3d7e3 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1373,7 +1373,7 @@ oci_execute(oci_statement *statement, char *func,ub4 mode) /* we only need to do the define step is this very statement is executed the first time! */ statement->executed++; - statement->columns = emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(statement->columns); zend_hash_init(statement->columns, 13, NULL, _oci_column_hash_dtor, 0); counter = 1; @@ -2569,7 +2569,7 @@ PHP_FUNCTION(ocidefinebyname) convert_to_string_ex(name); if (statement->defines == NULL) { - statement->defines = emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(statement->defines); zend_hash_init(statement->defines, 13, NULL, _oci_define_hash_dtor, 0); } @@ -2702,7 +2702,7 @@ PHP_FUNCTION(ocibindbyname) convert_to_string_ex(name); if (! statement->binds) { - statement->binds = emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(statement->binds); zend_hash_init(statement->binds, 13, NULL, _oci_bind_hash_dtor, 0); } diff --git a/ext/oracle/oracle.c b/ext/oracle/oracle.c index 2bcaabb580..3ea87d3dc8 100644 --- a/ext/oracle/oracle.c +++ b/ext/oracle/oracle.c @@ -840,7 +840,7 @@ PHP_FUNCTION(ora_bind) convert_to_long_ex(plen); if (cursor->params == NULL) { - cursor->params = (HashTable *)emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(cursor->params); if (!cursor->params || zend_hash_init(cursor->params, 19, NULL, HASH_DTOR pval_ora_param_destructor, 0) == FAILURE) { diff --git a/ext/rpc/com/com_wrapper.c b/ext/rpc/com/com_wrapper.c index 15d0ec8e34..ce9201e144 100644 --- a/ext/rpc/com/com_wrapper.c +++ b/ext/rpc/com/com_wrapper.c @@ -1184,7 +1184,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer return_value.type = IS_OBJECT; return_value.value.obj.ce = &com_class_entry; - return_value.value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(return_value.value.obj.properties); zend_hash_init(return_value.value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ALLOC_ZVAL(handle); @@ -1225,7 +1225,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer return_value.type = IS_OBJECT; return_value.value.obj.ce = &com_class_entry; - return_value.value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(return_value.value.obj.properties); zend_hash_init(return_value.value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ALLOC_ZVAL(handle); diff --git a/ext/rpc/com/conversion.c b/ext/rpc/com/conversion.c index 92d1a2511d..d6eb0d286e 100644 --- a/ext/rpc/com/conversion.c +++ b/ext/rpc/com/conversion.c @@ -746,7 +746,7 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent, Z_TYPE_P(pval_arg) = IS_OBJECT; pval_arg->value.obj.ce = &com_class_entry; - pval_arg->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(pval_arg->value.obj.properties); zend_hash_init(pval_arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ALLOC_ZVAL(handle); @@ -886,4 +886,4 @@ PHPAPI char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int per return C_str; } -#endif /* PHP_WIN32 */
\ No newline at end of file +#endif /* PHP_WIN32 */ diff --git a/ext/rpc/java/java.c b/ext/rpc/java/java.c index e8cb96a83f..27bfc1e14c 100644 --- a/ext/rpc/java/java.c +++ b/ext/rpc/java/java.c @@ -713,7 +713,7 @@ JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromObject if (presult->type != IS_OBJECT) { presult->type=IS_OBJECT; presult->value.obj.ce=&java_class_entry; - presult->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(presult->value.obj.properties); presult->is_ref=1; presult->refcount=1; zend_hash_init(presult->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); diff --git a/ext/standard/array.c b/ext/standard/array.c index a356cc3c70..8c27c7eeba 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1419,7 +1419,7 @@ HashTable* php_splice(HashTable *in_hash, int offset, int length, length = num_in-offset; /* Create and initialize output hash */ - out_hash = (HashTable *)emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(out_hash); zend_hash_init(out_hash, 0, NULL, ZVAL_PTR_DTOR, 0); /* Start at the beginning of the input hash and copy diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 25ea43e167..a0e2aee59e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1917,7 +1917,7 @@ PHP_FUNCTION(register_shutdown_function) RETURN_FALSE; } if (!BG(user_shutdown_function_names)) { - BG(user_shutdown_function_names) = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(BG(user_shutdown_function_names)); zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *))user_shutdown_function_dtor, 0); } |