tony2001 Wed Oct 17 08:17:34 2007 UTC
Modified files:
/php-src/ext/mysqli mysqli_api.c mysqli.c
Log:
use correct dtor and variable for the callback
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.151&r2=1.152&diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.151
php-src/ext/mysqli/mysqli_api.c:1.152
--- php-src/ext/mysqli/mysqli_api.c:1.151 Sun Oct 7 05:15:04 2007
+++ php-src/ext/mysqli/mysqli_api.c Wed Oct 17 08:17:34 2007
@@ -17,7 +17,7 @@
| Ulf Wendel <[EMAIL PROTECTED]>
|
+----------------------------------------------------------------------+
- $Id: mysqli_api.c,v 1.151 2007/10/07 05:15:04 davidw Exp $
+ $Id: mysqli_api.c,v 1.152 2007/10/17 08:17:34 tony2001 Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1403,7 +1403,7 @@
MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link",
MYSQLI_STATUS_VALID);
if (mysql->li_read) {
- zval_dtor(mysql->li_read);
+ zval_ptr_dtor(&(mysql->li_read));
mysql->li_read = NULL;
}
}
@@ -1415,7 +1415,7 @@
{
MY_MYSQL *mysql;
zval *mysql_link;
- zval callback_name;
+ zval callback_name, *p_callback_name;
zval *callback_func;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"Oz", &mysql_link, mysqli_link_class_entry,
@@ -1435,7 +1435,6 @@
zval_dtor(&callback_name);
RETURN_FALSE;
}
- zval_dtor(&callback_name);
/* save callback function */
if (!mysql->li_read) {
@@ -1443,7 +1442,7 @@
} else {
zval_dtor(mysql->li_read);
}
- ZVAL_STRINGL(mysql->li_read, Z_STRVAL_P(callback_func),
Z_STRLEN_P(callback_func), 1);
+ ZVAL_ZVAL(mysql->li_read, callback_name, 0, 0);
RETURN_TRUE;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.111&r2=1.112&diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.111 php-src/ext/mysqli/mysqli.c:1.112
--- php-src/ext/mysqli/mysqli.c:1.111 Tue Oct 16 13:18:55 2007
+++ php-src/ext/mysqli/mysqli.c Wed Oct 17 08:17:34 2007
@@ -17,7 +17,7 @@
| Ulf Wendel <[EMAIL PROTECTED]>
|
+----------------------------------------------------------------------+
- $Id: mysqli.c,v 1.111 2007/10/16 13:18:55 tony2001 Exp $
+ $Id: mysqli.c,v 1.112 2007/10/17 08:17:34 tony2001 Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -205,7 +205,7 @@
mysql->hash_key = NULL;
}
if (mysql->li_read) {
- zval_dtor(mysql->li_read);
+ zval_ptr_dtor(&(mysql->li_read));
mysql->li_read = NULL;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php