]> granicus.if.org Git - php/commitdiff
- More ZE2 fixes
authorAndi Gutmans <andi@php.net>
Mon, 13 Aug 2001 16:13:25 +0000 (16:13 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 13 Aug 2001 16:13:25 +0000 (16:13 +0000)
ext/imap/php_imap.c
ext/mcal/php_mcal.c
ext/msql/php_msql.c
ext/mssql/php_mssql.c
ext/odbc/php_odbc.c
ext/pgsql/pgsql.c

index 2c4afdf5a0d02a3a6e8a02e66a5976337b85df9c..10a820c4a180460f4b7eff3476026ccd7a322169 100644 (file)
@@ -244,7 +244,7 @@ static int add_assoc_object(zval *arg, char *key, zval *tmp)
        HashTable *symtable;
        
        if (arg->type == IS_OBJECT) {
-               symtable = arg->value.obj.properties;
+               symtable = Z_OBJPROP_P(arg);
        } else {
                symtable = arg->value.ht;
        }
@@ -259,7 +259,7 @@ static inline int add_next_index_object(zval *arg, zval *tmp)
        HashTable *symtable;
        
        if (arg->type == IS_OBJECT) {
-               symtable = arg->value.obj.properties;
+               symtable = Z_OBJPROP_P(arg);
        } else {
                symtable = arg->value.ht;
        }
index 9ae8422d886c95b497c53990252f8457f68b1fdc..d7a3f083a3c276d12ba670c01af13a78d0c94b18 100644 (file)
@@ -203,7 +203,7 @@ static int add_assoc_object(zval *arg, char *key, zval *tmp)
        HashTable *symtable;
        
        if (arg->type == IS_OBJECT) {
-               symtable = arg->value.obj.properties;
+               symtable = Z_OBJPROP_P(arg);
        } else {
                symtable = arg->value.ht;
        }
index a4441c682308159f41e1deae3f622d09ccfb657a..66639cb1a141b2adcf58056693225b211ba7b9e9 100644 (file)
@@ -982,9 +982,7 @@ PHP_FUNCTION(msql_fetch_object)
 {
        php_msql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
        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);
        }
 }
 /* }}} */
index f10dfadaa6a8fcf74e2d27c27eb95f244aea9cf5..995bc157b10aaca55dc1e29cb9ad735935d7fc03 100644 (file)
@@ -1226,9 +1226,7 @@ PHP_FUNCTION(mssql_fetch_object)
 {
        php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_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;
+               object_and_properties_init(return_value, &zend_standard_class_def, return_value->value.ht);
        }
 }
 
index 14dc9093a17b94630ffc2ca751cffd087f04d256..4fdde9db5f7cd41120648f89bb92de4489cb0e75 100644 (file)
@@ -1337,7 +1337,6 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
    Fetch a result row as an object */
 PHP_FUNCTION(odbc_fetch_object)
 {
-       /* OBJECTS_FIXME */
        php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, ODBC_OBJECT);
        if (Z_TYPE_P(return_value) == IS_ARRAY) {
                object_and_properties_init(return_value, &zend_standard_class_def, return_value->value.ht);
index fcf9271ab18086b09b1053eb46807e228090b072..4c2521d453328c8ecf6152ffafffa342c4972e8a 100644 (file)
@@ -1252,9 +1252,7 @@ PHP_FUNCTION(pg_fetch_object)
 {
        php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
        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);
        }
 }
 /* }}} */