Permalink
Browse files

Fix build issue with php >= 5.6.25 (#5318)

1 parent a6bc35d commit d5cc5840683bded229dbc2cc7d534db6d1e1f386 @tbonfort tbonfort committed Sep 2, 2016
Showing with 12 additions and 1 deletion.
  1. +1 −1 .travis.yml
  2. +11 −0 mapscript/php/error.c
View
@@ -1,7 +1,7 @@
language: php
php:
- 5.5
-# - 5.6
+ - 5.6
env:
global:
View
@@ -31,6 +31,17 @@
#include "php_mapscript.h"
+#if PHP_VERSION_ID >= 50625
+#undef ZVAL_STRING
+#define ZVAL_STRING(z, s, duplicate) do { \
+ const char *__s=(s); \
+ zval *__z = (z); \
+ Z_STRLEN_P(__z) = strlen(__s); \
+ Z_STRVAL_P(__z) = (duplicate?estrndup(__s, Z_STRLEN_P(__z)):(char*)__s);\
+ Z_TYPE_P(__z) = IS_STRING; \
+} while (0)
+#endif
+
zend_class_entry *mapscript_ce_error;
ZEND_BEGIN_ARG_INFO_EX(error___get_args, 0, 0, 1)

0 comments on commit d5cc584

Please sign in to comment.