Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd_priv.h
Hello Andi, he's not replicating them, he added them as a fallback. Which allows him to use the same sources for 5.2 - I guess. marcus Sunday, October 28, 2007, 4:31:59 AM, you wrote: 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:[EMAIL PROTECTED] 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 andreyTue 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.4r2=1.72.2.16.2.17.2.5dif 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.4Tue 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 [EMAIL PROTECTED] | +--- ---+ - $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.2r2=1.4.2.3diff_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.2Fri Oct 5 21:23:56 2007 +++ php-src/ext/mysqlnd/mysqlnd_priv.hTue 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 Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd_priv.h
Hi helly, Andi Marcus Boerger wrote: Hello Andi, he's not replicating them, he added them as a fallback. Which allows him to use the same sources for 5.2 - I guess. right, mysqlnd currently has one code base (stored in two branches). There are people, and probably there will be more that would like to try mysqlnd with 5.2 . Is there a new number of the extension API version, which I could use instead of checking whether some macros are defined? marcus Sunday, October 28, 2007, 4:31:59 AM, you wrote: 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:[EMAIL PROTECTED] 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 andreyTue 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.4r2=1.72.2.16.2.17.2.5dif 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.4Tue 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 [EMAIL PROTECTED] | +--- ---+ - $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.2r2=1.4.2.3diff_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.2Fri Oct 5 21:23:56 2007 +++ php-src/ext/mysqlnd/mysqlnd_priv.hTue 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 Best regards, Marcus Regards, Andrey -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd_priv.h
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:[EMAIL PROTECTED] 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 andreyTue 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.4r2=1.72.2.16.2.17.2.5dif 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.4Tue 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 [EMAIL PROTECTED] | +--- ---+ - $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.2r2=1.4.2.3diff_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.2Fri Oct 5 21:23:56 2007 +++ php-src/ext/mysqlnd/mysqlnd_priv.hTue 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 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php