Re: com php-src: Cleanup (avoid duplication): ext/mysqli/mysqli_warning.c

From: Date: Wed, 01 Jul 2015 15:20:06 +0000
Subject: Re: com php-src: Cleanup (avoid duplication): ext/mysqli/mysqli_warning.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87668@lists.php.net to get a copy of this message
yeah :) On Wed, Jul 1, 2015 at 5:22 PM, Nikita Popov <nikita.ppv@gmail.com> wrote: > On Wed, Jul 1, 2015 at 4:01 PM, Dmitry Stogov <dmitry@php.net> wrote: > >> Commit: c34651e8f8906f4da1a6b8bd1fc41b9b701a86dd >> Author: Dmitry Stogov <dmitry@zend.com> Wed, 1 Jul 2015 >> 17:01:42 +0300 >> Parents: eeaf73439af6d1fb66afeee935039bf67db5d2d6 >> Branches: master >> >> Link: >> >> http://git.php.net/?p=php-src.git;a=commitdiff;h=c34651e8f8906f4da1a6b8bd1fc41b9b701a86dd >> >> Log: >> Cleanup (avoid duplication) >> >> Changed paths: >> M ext/mysqli/mysqli_warning.c >> >> >> Diff: >> diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c >> index 396c6ed..7d69ce6 100644 >> --- a/ext/mysqli/mysqli_warning.c >> +++ b/ext/mysqli/mysqli_warning.c >> @@ -99,17 +99,15 @@ MYSQLI_WARNING *php_get_warnings(MYSQL *mysql) >> #else >> /* {{{ MYSQLI_WARNING *php_new_warning */ >> static >> -MYSQLI_WARNING *php_new_warning(const zval * reason, int errorno) >> +MYSQLI_WARNING *php_new_warning(zval * reason, int errorno) >> { >> MYSQLI_WARNING *w; >> >> w = (MYSQLI_WARNING *)ecalloc(1, sizeof(MYSQLI_WARNING)); >> >> - ZVAL_DUP(&w->reason, (zval *)reason); >> + ZVAL_COPY(&w->reason, reason); >> convert_to_string(&w->reason); >> >> - //????ZVAL_UTF8_STRINGL(&(w->reason), Z_STRVAL(w->reason), >> Z_STRLEN(w->reason), ZSTR_AUTOFREE); >> - >> ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", >> sizeof("HY000") - 1, >> Zzend_string_dupLICATE); >> > > The Zzend_string_dupLICATE looks like result of a broken s/r for STR_DUP. > > Nikita >

« previous php.cvs (#87668) next »