tony2001                Thu Aug 31 16:15:25 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/imap   php_imap.c 
    /php-src/ext/mbstring       mbstring.c 
    /php-src/ext/oci8   oci8_statement.c 
    /php-src/ext/posix  posix.c 
    /php-src/ext/reflection     php_reflection.c 
    /php-src/ext/sockets        sockets.c 
  Log:
  last portion of z/Z fixes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.3&r2=1.208.2.7.2.4&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.3 
php-src/ext/imap/php_imap.c:1.208.2.7.2.4
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.3   Fri Aug 11 15:07:29 2006
+++ php-src/ext/imap/php_imap.c Thu Aug 31 16:15:24 2006
@@ -26,7 +26,7 @@
    | PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>                       |
    +----------------------------------------------------------------------+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.3 2006/08/11 15:07:29 iliaa Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.4 2006/08/31 16:15:24 tony2001 Exp $ */
 
 #define IMAP41
 
@@ -1876,14 +1876,14 @@
        Save a specific body section to a file */
 PHP_FUNCTION(imap_savebody)
 {
-       zval *stream, *out;
+       zval *stream, **out;
        pils *imap_ptr = NULL;
        php_stream *writer = NULL;
        char *section = "";
        int section_len = 0, close_stream = 1;
        long msgno, flags = 0;
        
-       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"rzl|sl", &stream, &out, &msgno, &section, &section_len, &flags)) {
+       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"rZl|sl", &stream, &out, &msgno, &section, &section_len, &flags)) {
                RETURN_FALSE;
        }
        
@@ -1893,17 +1893,17 @@
                RETURN_FALSE;
        }
        
-       switch (Z_TYPE_P(out))
+       switch (Z_TYPE_PP(out))
        {
                case IS_LONG:
                case IS_RESOURCE:
                        close_stream = 0;
-                       php_stream_from_zval(writer, &out);
+                       php_stream_from_zval(writer, out);
                break;
 
                default:
-                       convert_to_string_ex(&out);
-                       writer = php_stream_open_wrapper(Z_STRVAL_P(out), "wb", 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+                       convert_to_string_ex(out);
+                       writer = php_stream_open_wrapper(Z_STRVAL_PP(out), 
"wb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
                break;
        }
        
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.11&r2=1.224.2.22.2.12&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.11 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.12
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.11     Fri Aug 25 16:26:50 2006
+++ php-src/ext/mbstring/mbstring.c     Thu Aug 31 16:15:24 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.11 2006/08/25 16:26:50 masugata Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.12 2006/08/31 16:15:24 tony2001 Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -1645,7 +1645,7 @@
        mbfl_string haystack, needle;
        char *enc_name = NULL;
        int enc_name_len;
-       zval *zoffset;
+       zval **zoffset;
        long offset = 0, str_flg;
        char *enc_name2 = NULL;
        int enc_name_len2;
@@ -1657,14 +1657,14 @@
        needle.no_language = MBSTRG(current_language);
        needle.no_encoding = MBSTRG(current_internal_encoding);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|zs", (char 
**)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &zoffset, 
&enc_name, &enc_name_len) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|Zs", (char 
**)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &zoffset, 
&enc_name, &enc_name_len) == FAILURE) {
                RETURN_FALSE;
        }
 
        if(ZEND_NUM_ARGS() >= 3) {
-               if (Z_TYPE_P(zoffset) == IS_STRING) {
-                       enc_name2     = Z_STRVAL_P(zoffset);
-                       enc_name_len2 = Z_STRLEN_P(zoffset);
+               if (Z_TYPE_PP(zoffset) == IS_STRING) {
+                       enc_name2     = Z_STRVAL_PP(zoffset);
+                       enc_name_len2 = Z_STRLEN_PP(zoffset);
                        str_flg       = 1;
 
                        if (enc_name2 != NULL) {
@@ -1690,15 +1690,15 @@
                        }
 
                        if(str_flg) {
-                                       convert_to_long(zoffset);
-                                       offset   = Z_LVAL_P(zoffset);
+                                       convert_to_long_ex(zoffset);
+                                       offset   = Z_LVAL_PP(zoffset);
                        } else {
                                enc_name     = enc_name2;
                                enc_name_len = enc_name_len2;
                        }
                } else {
-                       convert_to_long(zoffset);
-                       offset = Z_LVAL_P(zoffset);
+                       convert_to_long_ex(zoffset);
+                       offset = Z_LVAL_PP(zoffset);
                }
        }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.14.2.8&r2=1.7.2.14.2.9&diff_format=u
Index: php-src/ext/oci8/oci8_statement.c
diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.8 
php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.9
--- php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.8      Tue Aug 22 11:09:12 2006
+++ php-src/ext/oci8/oci8_statement.c   Thu Aug 31 16:15:24 2006
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_statement.c,v 1.7.2.14.2.8 2006/08/22 11:09:12 tony2001 Exp $ */
+/* $Id: oci8_statement.c,v 1.7.2.14.2.9 2006/08/31 16:15:24 tony2001 Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -800,7 +800,7 @@
        /* dvoid *php_oci_collection           = NULL; */
        OCIStmt *oci_stmt               = NULL;
        dvoid *bind_data                = NULL;
-       php_oci_bind bind, *bindp;
+       php_oci_bind bind, *old_bind, *bindp;
        int mode = OCI_DATA_AT_EXEC;
        sb4 value_sz = -1;
 
@@ -900,7 +900,11 @@
        }
 
        memset((void*)&bind,0,sizeof(php_oci_bind));
-       zend_hash_update(statement->binds, name, name_len + 1, &bind, 
sizeof(php_oci_bind), (void **)&bindp);
+       if (zend_hash_find(statement->binds, name, name_len + 1, (void 
**)&old_bind) == SUCCESS) {
+               bindp = old_bind;
+       } else {
+               zend_hash_update(statement->binds, name, name_len + 1, &bind, 
sizeof(php_oci_bind), (void **)&bindp);
+       }
        
        bindp->descriptor = oci_desc;
        bindp->statement = oci_stmt;
@@ -1079,11 +1083,11 @@
  Helper function to get column by name and index */
 php_oci_out_column 
*php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS, int 
need_data)
 {
-       zval *z_statement, *column_index;
+       zval *z_statement, **column_index;
        php_oci_statement *statement;
        php_oci_out_column *column;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", 
&z_statement, &column_index) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rZ", 
&z_statement, &column_index) == FAILURE) {
                return NULL;
        }
 
@@ -1097,17 +1101,17 @@
                return NULL;
        }
        
-       if (Z_TYPE_P(column_index) == IS_STRING) {
-               column = php_oci_statement_get_column(statement, -1, 
Z_STRVAL_P(column_index), Z_STRLEN_P(column_index) TSRMLS_CC);
+       if (Z_TYPE_PP(column_index) == IS_STRING) {
+               column = php_oci_statement_get_column(statement, -1, 
Z_STRVAL_PP(column_index), Z_STRLEN_PP(column_index) TSRMLS_CC);
                if (!column) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 
column name \"%s\"", Z_STRVAL_P(column_index));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 
column name \"%s\"", Z_STRVAL_PP(column_index));
                        return NULL;
                }
        } else {
-               convert_to_long(column_index);
-               column = php_oci_statement_get_column(statement, 
Z_LVAL_P(column_index), NULL, 0 TSRMLS_CC);
+               convert_to_long_ex(column_index);
+               column = php_oci_statement_get_column(statement, 
Z_LVAL_PP(column_index), NULL, 0 TSRMLS_CC);
                if (!column) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 
column index \"%ld\"", Z_LVAL_P(column_index));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 
column index \"%ld\"", Z_LVAL_PP(column_index));
                        return NULL;
                }
        }
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.3&r2=1.70.2.3.2.4&diff_format=u
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.70.2.3.2.3 
php-src/ext/posix/posix.c:1.70.2.3.2.4
--- php-src/ext/posix/posix.c:1.70.2.3.2.3      Mon Jun 19 23:52:39 2006
+++ php-src/ext/posix/posix.c   Thu Aug 31 16:15:24 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: posix.c,v 1.70.2.3.2.3 2006/06/19 23:52:39 iliaa Exp $ */
+/* $Id: posix.c,v 1.70.2.3.2.4 2006/08/31 16:15:24 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -147,7 +147,7 @@
 static PHP_MINFO_FUNCTION(posix)
 {
        php_info_print_table_start();
-       php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.3 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.4 $");
        php_info_print_table_end();
 }
 /* }}} */
@@ -552,23 +552,23 @@
    Determine terminal device name (POSIX.1, 4.7.2) */
 PHP_FUNCTION(posix_ttyname)
 {
-       zval *z_fd;
+       zval **z_fd;
        char *p;
        int fd;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &z_fd) == 
FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &z_fd) == 
FAILURE) {
                RETURN_FALSE;
        }
 
-       switch (Z_TYPE_P(z_fd)) {
+       switch (Z_TYPE_PP(z_fd)) {
                case IS_RESOURCE:
-                       if (!php_posix_stream_get_fd(z_fd, &fd TSRMLS_CC)) {
+                       if (!php_posix_stream_get_fd(*z_fd, &fd TSRMLS_CC)) {
                                RETURN_FALSE;
                        }
                        break;
                default:
-                       convert_to_long(z_fd);
-                       fd = Z_LVAL_P(z_fd);
+                       convert_to_long_ex(z_fd);
+                       fd = Z_LVAL_PP(z_fd);
        }
 
        if (NULL == (p = ttyname(fd))) {
@@ -584,22 +584,22 @@
    Determine if filedesc is a tty (POSIX.1, 4.7.1) */
 PHP_FUNCTION(posix_isatty)
 {
-       zval *z_fd;
+       zval **z_fd;
        int fd;
        
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &z_fd) == 
FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &z_fd) == 
FAILURE) {
                RETURN_FALSE;
        }
        
-       switch (Z_TYPE_P(z_fd)) {
+       switch (Z_TYPE_PP(z_fd)) {
                case IS_RESOURCE:
-                       if (!php_posix_stream_get_fd(z_fd, &fd TSRMLS_CC)) {
+                       if (!php_posix_stream_get_fd(*z_fd, &fd TSRMLS_CC)) {
                                RETURN_FALSE;
                        }
                        break;
                default:
-                       convert_to_long(z_fd);
-                       fd = Z_LVAL_P(z_fd);
+                       convert_to_long_ex(z_fd);
+                       fd = Z_LVAL_PP(z_fd);
        }
 
        if (isatty(fd)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.20&r2=1.164.2.33.2.21&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.20 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.21
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.20     Wed Aug 30 
10:42:49 2006
+++ php-src/ext/reflection/php_reflection.c     Thu Aug 31 16:15:24 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.20 2006/08/30 10:42:49 tony2001 Exp $ 
*/
+/* $Id: php_reflection.c,v 1.164.2.33.2.21 2006/08/31 16:15:24 tony2001 Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1763,7 +1763,7 @@
 ZEND_METHOD(reflection_parameter, __construct)
 {
        parameter_reference *ref;
-       zval *reference, *parameter;
+       zval *reference, **parameter;
        zval *object;
        zval *name;
        reflection_object *intern;
@@ -1772,7 +1772,7 @@
        int position;
        zend_class_entry *ce = NULL;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &reference, 
&parameter) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zZ", &reference, 
&parameter) == FAILURE) {
                return;
        }
 
@@ -1786,9 +1786,8 @@
        switch (Z_TYPE_P(reference)) {
                case IS_STRING: {
                                unsigned int lcname_len;
-                       char *lcname;
+                               char *lcname;
 
-                               convert_to_string_ex(&reference);
                                lcname_len = Z_STRLEN_P(reference);
                                lcname = 
zend_str_tolower_dup(Z_STRVAL_P(reference), lcname_len);
                                if (zend_hash_find(EG(function_table), lcname, 
lcname_len + 1, (void**) &fptr) == FAILURE) {
@@ -1847,8 +1846,8 @@
        
        /* Now, search for the parameter */
        arg_info = fptr->common.arg_info;
-       if (Z_TYPE_P(parameter) == IS_LONG) {
-               position= Z_LVAL_P(parameter);
+       if (Z_TYPE_PP(parameter) == IS_LONG) {
+               position= Z_LVAL_PP(parameter);
                if (position < 0 || (zend_uint)position >= 
fptr->common.num_args) {
                        _DO_THROW("The parameter specified by its offset could 
not be found");
                        /* returns out of this function */
@@ -1857,9 +1856,9 @@
                zend_uint i;
 
                position= -1;
-               convert_to_string_ex(&parameter);
+               convert_to_string_ex(parameter);
                for (i = 0; i < fptr->common.num_args; i++) {
-                       if (arg_info[i].name && strcmp(arg_info[i].name, 
Z_STRVAL_P(parameter)) == 0) {
+                       if (arg_info[i].name && strcmp(arg_info[i].name, 
Z_STRVAL_PP(parameter)) == 0) {
                                position= i;
                                break;
                        }
@@ -3867,7 +3866,7 @@
        reflection_object *intern;
        property_reference *ref;
        zval *object, name;
-       zval **member= NULL;
+       zval **member = NULL, *member_p = NULL;
 
        METHOD_NOTSTATIC(reflection_property_ptr);
        GET_REFLECTION_OBJECT_PTR(ref);
@@ -3886,19 +3885,22 @@
                        zend_error(E_ERROR, "Internal error: Could not find the 
property %s::%s", intern->ce->name, ref->prop->name);
                        /* Bails out */
                }
+               *return_value= **member;
+               zval_copy_ctor(return_value);
+               INIT_PZVAL(return_value);
        } else {
                if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", 
&object) == FAILURE) {
                        return;
                }
-               if (zend_hash_quick_find(Z_OBJPROP_P(object), ref->prop->name, 
ref->prop->name_length + 1, ref->prop->h, (void **) &member) == FAILURE) {
-                       zend_error(E_ERROR, "Internal error: Could not find the 
property %s::%s", intern->ce->name, ref->prop->name);
-                       /* Bails out */
+               member_p = zend_read_property(Z_OBJCE_P(object), object, 
ref->prop->name, ref->prop->name_length, 1 TSRMLS_CC);
+               *return_value= *member_p;
+               zval_copy_ctor(return_value);
+               INIT_PZVAL(return_value);
+               if (member_p != EG(uninitialized_zval_ptr)) {
+                       zval_add_ref(&member_p);
+                       zval_ptr_dtor(&member_p);
                }
        }
-
-       *return_value= **member;
-       zval_copy_ctor(return_value);
-       INIT_PZVAL(return_value);
 }
 /* }}} */
 
@@ -3934,38 +3936,38 @@
                }
                zend_update_class_constants(intern->ce TSRMLS_CC);
                prop_table = CE_STATIC_MEMBERS(intern->ce);
-       } else {
-               if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oz", 
&object, &value) == FAILURE) {
-                       return;
-               }
-               prop_table = Z_OBJPROP_P(object);
-       }
 
-       if (zend_hash_quick_find(prop_table, ref->prop->name, 
ref->prop->name_length + 1, ref->prop->h, (void **) &variable_ptr) == FAILURE) {
-               zend_error(E_ERROR, "Internal error: Could not find the 
property %s::%s", intern->ce->name, ref->prop->name);
-               /* Bails out */
-       }
-       if (*variable_ptr == value) {
-               setter_done = 1;
-       } else {
-               if (PZVAL_IS_REF(*variable_ptr)) {
-                       zval_dtor(*variable_ptr);
-                       (*variable_ptr)->type = value->type;
-                       (*variable_ptr)->value = value->value;
-                       if (value->refcount > 0) {
-                               zval_copy_ctor(*variable_ptr);
-                       }
+               if (zend_hash_quick_find(prop_table, ref->prop->name, 
ref->prop->name_length + 1, ref->prop->h, (void **) &variable_ptr) == FAILURE) {
+                       zend_error(E_ERROR, "Internal error: Could not find the 
property %s::%s", intern->ce->name, ref->prop->name);
+                       /* Bails out */
+               }
+               if (*variable_ptr == value) {
                        setter_done = 1;
+               } else {
+                       if (PZVAL_IS_REF(*variable_ptr)) {
+                               zval_dtor(*variable_ptr);
+                               (*variable_ptr)->type = value->type;
+                               (*variable_ptr)->value = value->value;
+                               if (value->refcount > 0) {
+                                       zval_copy_ctor(*variable_ptr);
+                               }
+                               setter_done = 1;
+                       }
                }
-       }
-       if (!setter_done) {
-               zval **foo;
+               if (!setter_done) {
+                       zval **foo;
 
-               value->refcount++;
-               if (PZVAL_IS_REF(value)) {
-                       SEPARATE_ZVAL(&value);
+                       value->refcount++;
+                       if (PZVAL_IS_REF(value)) {
+                               SEPARATE_ZVAL(&value);
+                       }
+                       zend_hash_quick_update(prop_table, ref->prop->name, 
ref->prop->name_length+1, ref->prop->h, &value, sizeof(zval *), (void **) &foo);
+               }
+       } else {
+               if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oz", 
&object, &value) == FAILURE) {
+                       return;
                }
-               zend_hash_quick_update(prop_table, ref->prop->name, 
ref->prop->name_length+1, ref->prop->h, &value, sizeof(zval *), (void **) &foo);
+               zend_update_property(Z_OBJCE_P(object), object, 
ref->prop->name, ref->prop->name_length, value TSRMLS_CC);
        }
 }
 /* }}} */
@@ -4796,7 +4798,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Reflection", "enabled");
 
-       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.20 2006/08/30 10:42:49 tony2001 Exp $");
+       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.21 2006/08/31 16:15:24 tony2001 Exp $");
 
        php_info_print_table_end();
 } /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.2&r2=1.171.2.9.2.3&diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.2 
php-src/ext/sockets/sockets.c:1.171.2.9.2.3
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.2 Sun Jul 30 11:54:17 2006
+++ php-src/ext/sockets/sockets.c       Thu Aug 31 16:15:24 2006
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.2 2006/07/30 11:54:17 tony2001 Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.3 2006/08/31 16:15:24 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1598,7 +1598,7 @@
    Sets socket options for the socket */
 PHP_FUNCTION(socket_set_option)
 {
-       zval                    *arg1, *arg4;
+       zval                    *arg1, **arg4;
        struct linger   lv;
        struct timeval tv;
        php_socket              *php_sock;
@@ -1619,7 +1619,7 @@
        char                    *sec_key = "sec";
        char                    *usec_key = "usec";
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllz", &arg1, 
&level, &optname, &arg4) == FAILURE)
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllZ", &arg1, 
&level, &optname, &arg4) == FAILURE)
                return;
 
        ZEND_FETCH_RESOURCE(php_sock, php_socket *, &arg1, -1, le_socket_name, 
le_socket);
@@ -1628,8 +1628,8 @@
 
        switch (optname) {
                case SO_LINGER:
-                       convert_to_array_ex(&arg4);
-                       opt_ht = HASH_OF(arg4);
+                       convert_to_array_ex(arg4);
+                       opt_ht = HASH_OF(*arg4);
 
                        if (zend_hash_find(opt_ht, l_onoff_key, 
strlen(l_onoff_key) + 1, (void **)&l_onoff) == FAILURE) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "no 
key \"%s\" passed in optval", l_onoff_key);
@@ -1651,8 +1651,8 @@
                        break;
                case SO_RCVTIMEO:
                case SO_SNDTIMEO:
-                       convert_to_array_ex(&arg4);
-                       opt_ht = HASH_OF(arg4);
+                       convert_to_array_ex(arg4);
+                       opt_ht = HASH_OF(*arg4);
 
                        if (zend_hash_find(opt_ht, sec_key, strlen(sec_key) + 
1, (void **)&sec) == FAILURE) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "no 
key \"%s\" passed in optval", sec_key);
@@ -1677,8 +1677,8 @@
 #endif
                        break;
                default:
-                       convert_to_long_ex(&arg4);
-                       ov = Z_LVAL_P(arg4);
+                       convert_to_long_ex(arg4);
+                       ov = Z_LVAL_PP(arg4);
                        
                        optlen = sizeof(ov);
                        opt_ptr = &ov;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to