RE: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd_priv.h
| From: | Andi Gutmans | Date: | Sun, 28 Oct 2007 03:31:59 +0000 |
| Subject: | RE: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd_priv.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-46801@lists.php.net to get a copy of this message | ||
Hi Andrey,
Are you sure it's a good idea to replicate these macros? It kind of
breaks the ability to tweak them in a central place.
What's the reasoning for it?
Andi
> -----Original Message-----
> From: Andrey Hristov [mailto:andrey@php.net]
> Sent: Tuesday, October 16, 2007 1:56 PM
> To: php-cvs@lists.php.net
> Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c
> /ext/mysqlnd mysqlnd_priv.h
>
> andrey Tue Oct 16 20:56:22 2007 UTC
>
> Modified files: (Branch: PHP_5_3)
> /php-src/ext/mysqli mysqli.c
> /php-src/ext/mysqlnd mysqlnd_priv.h
> Log:
> Sync mysqlnd. Should still compile with 5_2 for those who want to
use
> the
> current stable branch. mysqli from 5_3 patched for mysqlnd should be
> also
> compilable with 5_2.
>
>
> http://cvs.php.net/viewvc.cgi/php-
>
src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.17.2.4&r2=1.72.2.16.2.17.2.5&dif
> f_format=u
> Index: php-src/ext/mysqli/mysqli.c
> diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.4 php-
> src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.5
> --- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.4 Tue Oct 16
> 13:20:14 2007
> +++ php-src/ext/mysqli/mysqli.c Tue Oct 16 20:56:22 2007
> @@ -15,7 +15,7 @@
> | Author: Georg Richter <georg@php.net>
> |
>
+-------------------------------------------------------------------
> ---+
>
> - $Id: mysqli.c,v 1.72.2.16.2.17.2.4 2007/10/16 13:20:14 tony2001 Exp
> $
> + $Id: mysqli.c,v 1.72.2.16.2.17.2.5 2007/10/16 20:56:22 andrey Exp $
> */
>
> #ifdef HAVE_CONFIG_H
> @@ -315,6 +315,14 @@
> }
> /* }}} */
>
> +#ifndef Z_ADDREF_P
> +/* PHP 5.2, old GC */
> +#define Z_ADDREF_P(pz)
(++(pz)->refcount)
> +#define Z_REFCOUNT_P(pz) ((pz)->refcount)
> +#define Z_SET_REFCOUNT_P(pz, rc) ((pz)->refcount = rc)
> +#endif
> +
> +
> /* {{{ mysqli_read_property */
> zval *mysqli_read_property(zval *object, zval *member, int type
> TSRMLS_DC)
> {
> http://cvs.php.net/viewvc.cgi/php-
> src/ext/mysqlnd/mysqlnd_priv.h?r1=1.4.2.2&r2=1.4.2.3&diff_format=u
> Index: php-src/ext/mysqlnd/mysqlnd_priv.h
> diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.2 php-
> src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.3
> --- php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.2 Fri Oct 5
21:23:56
> 2007
> +++ php-src/ext/mysqlnd/mysqlnd_priv.h Tue Oct 16 20:56:22 2007
> @@ -18,11 +18,21 @@
>
+-------------------------------------------------------------------
> ---+
> */
>
> -/* $Id: mysqlnd_priv.h,v 1.4.2.2 2007/10/05 21:23:56 andrey Exp $ */
> +/* $Id: mysqlnd_priv.h,v 1.4.2.3 2007/10/16 20:56:22 andrey Exp $ */
>
> #ifndef MYSQLND_PRIV_H
> #define MYSQLND_PRIV_H
>
> +#ifndef Z_ADDREF_P
> +/* PHP 5.2, old GC */
> +#define Z_ADDREF_P(pz)
(++(pz)->refcount)
> +#define Z_DELREF_P(pz)
(--(pz)->refcount)
> +#define Z_REFCOUNT_P(pz) ((pz)->refcount)
> +#define Z_SET_REFCOUNT_P(pz, rc) ((pz)->refcount = rc)
> +#define Z_REFCOUNT_PP(ppz) Z_REFCOUNT_P(*(ppz))
> +#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
> +#endif
> +
> #ifdef ZTS
> #include "TSRM.h"
> #endif
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php