r87476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87475‎ | r87476 | r87477 >
Date:02:52, 5 May 2011
Author:tstarling
Status:ok
Tags:
Comment:
Some updates for PHP 5.3
Modified paths:
  • /trunk/extensions/FastStringSearch/fss.c (modified) (history)

Diff [purge]

Index: trunk/extensions/FastStringSearch/fss.c
@@ -9,6 +9,7 @@
1010 #endif
1111
1212 #include "php.h"
 13+#include "Zend/zend.h"
1314 #include "php_ini.h"
1415 #include "ext/standard/info.h"
1516 #include "php_fss.h"
@@ -215,7 +216,7 @@
216217 if (zend_hash_get_current_key_ex(hash, &string_key, &string_key_len, &num_key, 0,
217218 &hpos) == HASH_KEY_IS_LONG)
218219 {
219 - sprintf(buffer, "%u", num_key);
 220+ sprintf(buffer, "%lu", num_key);
220221 string_key = buffer;
221222 string_key_len = strlen(buffer);
222223 } else {
@@ -240,7 +241,11 @@
241242
242243 /* Add the value to the replace array */
243244 convert_to_string_ex(value);
 245+#ifdef Z_ADDREF_P /* 5.3 */
 246+ Z_ADDREF_P(*value);
 247+#else
244248 ZVAL_ADDREF(*value);
 249+#endif
245250 res->replace[i] = *value;
246251 }
247252 kwsprep(res->set);

Status & tagging log