diff options
author | Andrey Hristov <andrey@php.net> | 2007-10-16 20:56:22 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2007-10-16 20:56:22 +0000 |
commit | 8a2e9e60435021447aa877531138b0ce95f255b0 (patch) | |
tree | 043170d7f391f19cf17fb8be4ceb5ccdd8f3dc8c | |
parent | c9e481590f73ca35424088b24d2212b6b5034aef (diff) | |
download | php-git-8a2e9e60435021447aa877531138b0ce95f255b0.tar.gz |
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.
-rw-r--r-- | ext/mysqli/mysqli.c | 8 | ||||
-rw-r--r-- | ext/mysqlnd/mysqlnd_priv.h | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index c2fda21b0e..7aca237494 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -315,6 +315,14 @@ static int mysqli_write_na(mysqli_object *obj, zval *newval TSRMLS_DC) } /* }}} */ +#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) { diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index 83bc0665cb..cd3f11cbb4 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -23,6 +23,16 @@ #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 |