diff options
-rw-r--r-- | ext/dbx/dbx.c | 27 | ||||
-rw-r--r-- | ext/dotnet/dotnet.cpp | 2 | ||||
-rw-r--r-- | ext/fbsql/php_fbsql.c | 7 | ||||
-rw-r--r-- | ext/ming/ming.c | 2 | ||||
-rw-r--r-- | ext/qtdom/qtdom.c | 6 | ||||
-rw-r--r-- | ext/rpc/dotnet/dotnet.cpp | 2 | ||||
-rw-r--r-- | ext/sybase_ct/php_sybase_ct.c | 4 |
7 files changed, 21 insertions, 29 deletions
diff --git a/ext/dbx/dbx.c b/ext/dbx/dbx.c index aba9d95ca5..906eab3bf3 100644 --- a/ext/dbx/dbx.c +++ b/ext/dbx/dbx.c @@ -76,9 +76,9 @@ int get_module_identifier(char * module_name) { int split_dbx_handle_object(zval ** dbx_object, zval *** pdbx_handle, zval *** pdbx_module, zval *** pdbx_database) { convert_to_object_ex(dbx_object); - if (zend_hash_find((*dbx_object)->value.obj.properties, "handle", 7, (void **) pdbx_handle)==FAILURE - || zend_hash_find((*dbx_object)->value.obj.properties, "module", 7, (void **) pdbx_module)==FAILURE - || zend_hash_find((*dbx_object)->value.obj.properties, "database", 9, (void **) pdbx_database)==FAILURE) { + if (zend_hash_find(Z_OBJPROP_PP(dbx_object), "handle", 7, (void **) pdbx_handle)==FAILURE + || zend_hash_find(Z_OBJPROP_PP(dbx_object), "module", 7, (void **) pdbx_module)==FAILURE + || zend_hash_find(Z_OBJPROP_PP(dbx_object), "database", 9, (void **) pdbx_database)==FAILURE) { return 0; } return 1; @@ -284,9 +284,9 @@ ZEND_FUNCTION(dbx_connect) RETURN_LONG(0); } - zend_hash_update(return_value->value.obj.properties, "handle", 7, (void *)&(rv_dbx_handle), sizeof(zval *), NULL); - zend_hash_update(return_value->value.obj.properties, "module", 7, (void *)&(dbx_module), sizeof(zval *), NULL); - zend_hash_update(return_value->value.obj.properties, "database", 9, (void *)&(db_name), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "handle", 7, (void *)&(rv_dbx_handle), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "module", 7, (void *)&(dbx_module), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "database", 9, (void *)&(db_name), sizeof(zval *), NULL); } /* }}} */ @@ -387,7 +387,7 @@ ZEND_FUNCTION(dbx_query) RETURN_LONG(0); } /* add result_handle property to return_value */ - zend_hash_update(return_value->value.obj.properties, "handle", 7, (void *)&(rv_result_handle), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "handle", 7, (void *)&(rv_result_handle), sizeof(zval *), NULL); /* init info property as array and add to return_value as a property */ if (info_flags & DBX_RESULT_INFO) { MAKE_STD_ZVAL(info); @@ -396,7 +396,7 @@ ZEND_FUNCTION(dbx_query) FREE_ZVAL(info); RETURN_LONG(0); } - zend_hash_update(return_value->value.obj.properties, "info", 5, (void *)&(info), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "info", 5, (void *)&(info), sizeof(zval *), NULL); } /* init data property as array and add to return_value as a property */ MAKE_STD_ZVAL(data); @@ -405,7 +405,7 @@ ZEND_FUNCTION(dbx_query) FREE_ZVAL(data); RETURN_LONG(0); } - zend_hash_update(return_value->value.obj.properties, "data", 5, (void *)&(data), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "data", 5, (void *)&(data), sizeof(zval *), NULL); /* get columncount and add to returnvalue as property */ MAKE_STD_ZVAL(rv_column_count); ZVAL_LONG(rv_column_count, 0); @@ -415,7 +415,7 @@ ZEND_FUNCTION(dbx_query) FREE_ZVAL(rv_column_count); RETURN_LONG(0); } - zend_hash_update(return_value->value.obj.properties, "cols", 5, (void *)&(rv_column_count), sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(return_value), "cols", 5, (void *)&(rv_column_count), sizeof(zval *), NULL); /* fill the info array with columnnames and types (indexed and assoc) */ if (info_flags & DBX_RESULT_INFO) { zval * info_row_name; @@ -645,7 +645,7 @@ ZEND_FUNCTION(dbx_sort) RETURN_LONG(0); } - if (zend_hash_find((*arguments[0])->value.obj.properties, "data", 5, (void **) &zval_data)==FAILURE + if (zend_hash_find(Z_OBJPROP_PP(arguments[0]), "data", 5, (void **) &zval_data)==FAILURE || (*zval_data)->type != IS_ARRAY) { zend_error(E_WARNING, "Wrong argument type for sort"); RETURN_LONG(0); @@ -653,9 +653,8 @@ ZEND_FUNCTION(dbx_sort) arguments[0] = zval_data; dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "usort", &returned_zval, number_of_arguments, arguments); - zval_dtor(returned_zval); - FREE_ZVAL(returned_zval); - + zval_ptr_dtor(&returned_zval); + RETURN_LONG(1); } diff --git a/ext/dotnet/dotnet.cpp b/ext/dotnet/dotnet.cpp index b9af5a6d83..7461dd2a17 100644 --- a/ext/dotnet/dotnet.cpp +++ b/ext/dotnet/dotnet.cpp @@ -177,7 +177,7 @@ void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_propert *object_handle = *return_value; pval_copy_constructor(object_handle); INIT_PZVAL(object_handle); - zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL); + zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL); pval_destructor(&function_name->element); } else { php_COM_call_function_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU, property_reference); diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 460c77a8ec..4f4786b6e6 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -2382,11 +2382,8 @@ PHP_FUNCTION(fbsql_fetch_assoc) PHP_FUNCTION(fbsql_fetch_object) { php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC); - if (return_value->type==IS_ARRAY) - { - return_value->type=IS_OBJECT; - return_value->value.obj.properties = return_value->value.ht; - return_value->value.obj.ce = &zend_standard_class_def; + if (return_value->type==IS_ARRAY) { + object_and_properties_init(return_value, &zend_standard_class_def, return_value->value.ht); } } /* }}} */ diff --git a/ext/ming/ming.c b/ext/ming/ming.c index e3961fafc2..507af0572f 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -117,7 +117,7 @@ static void *SWFgetProperty(zval *id, char *name, int namelen, int proptype TSRM if(id) { - if(zend_hash_find(id->value.obj.properties, name, namelen+1, (void **)&tmp) == FAILURE) + if(zend_hash_find(Z_OBJPROP_P(id), name, namelen+1, (void **)&tmp) == FAILURE) { php_error(E_WARNING, "unable to find property %s", name); return NULL; diff --git a/ext/qtdom/qtdom.c b/ext/qtdom/qtdom.c index a3d3106f14..7c4bb4386e 100644 --- a/ext/qtdom/qtdom.c +++ b/ext/qtdom/qtdom.c @@ -176,10 +176,8 @@ static int qdom_find_children( zval **children, struct qdom_node *orig_node TSRM struct qdom_attribute *attr = qdom_do_node_attributes( node ); if ( qdom_find_attributes( &a_children, attr TSRMLS_CC) > 0 ) { - zend_hash_update(child->value.obj.properties, - "attributes", sizeof("attributes"), - (void *) &a_children, sizeof(zval *), - NULL); + zend_hash_update(Z_OBJPROP_P(child), "attributes", sizeof("attributes"), + (void *) &a_children, sizeof(zval *), NULL); } qdom_do_attributes_free( attr ); /* add_property_long(child, "attributes", num_attrs ); */ diff --git a/ext/rpc/dotnet/dotnet.cpp b/ext/rpc/dotnet/dotnet.cpp index b9af5a6d83..7461dd2a17 100644 --- a/ext/rpc/dotnet/dotnet.cpp +++ b/ext/rpc/dotnet/dotnet.cpp @@ -177,7 +177,7 @@ void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_propert *object_handle = *return_value; pval_copy_constructor(object_handle); INIT_PZVAL(object_handle); - zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL); + zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL); pval_destructor(&function_name->element); } else { php_COM_call_function_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU, property_reference); diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 8483f20116..0dd7371042 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -1384,9 +1384,7 @@ PHP_FUNCTION(sybase_fetch_object) { php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU); if (return_value->type==IS_ARRAY) { - return_value->type=IS_OBJECT; - return_value->value.obj.properties = return_value->value.ht; - return_value->value.obj.ce = &zend_standard_class_def; + object_and_properties_init(return_value, &zend_standard_class_def, return_value->value.ht); } } /* }}} */ |