List:Commits« Previous MessageNext Message »
From:ahristov Date:October 16 2007 8:44pm
Subject:PHP mysqlnd svn commit: r1105 - in trunk: mysqlnd php5/ext/mysqli
View as plain text  
Author: ahristov
Date: 2007-10-16 22:44:15 +0200 (Tue, 16 Oct 2007)
New Revision: 1105

Modified:
   trunk/mysqlnd/mysqlnd_priv.h
   trunk/php5/ext/mysqli/mysqli.c
Log:
Make mysqlnd and php5/mysqli compile with php-5.2 sources


Modified: trunk/mysqlnd/mysqlnd_priv.h
===================================================================
--- trunk/mysqlnd/mysqlnd_priv.h	2007-10-16 20:15:27 UTC (rev 1104)
+++ trunk/mysqlnd/mysqlnd_priv.h	2007-10-16 20:44:15 UTC (rev 1105)
@@ -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

Modified: trunk/php5/ext/mysqli/mysqli.c
===================================================================
--- trunk/php5/ext/mysqli/mysqli.c	2007-10-16 20:15:27 UTC (rev 1104)
+++ trunk/php5/ext/mysqli/mysqli.c	2007-10-16 20:44:15 UTC (rev 1105)
@@ -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)
 {

Thread
PHP mysqlnd svn commit: r1105 - in trunk: mysqlnd php5/ext/mysqliahristov16 Oct