From 90c7782c811a87c3ac062ba3efed80b28f0f4604 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 12 Nov 2018 07:32:32 +0100 Subject: update to 0.8.0 drop patch merged upstream raise dependency on PHP 5.6 raise dependency on libmustache 0.5.0 open https://github.com/jbboehr/php-mustache/pull/52 missing file --- php5to7.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 php5to7.h (limited to 'php5to7.h') diff --git a/php5to7.h b/php5to7.h new file mode 100644 index 0000000..84fd3dd --- /dev/null +++ b/php5to7.h @@ -0,0 +1,43 @@ + +#ifndef PHP_MUSTACHE_PHP5TO7 +#define PHP_MUSTACHE_PHP5TO7 + +#if PHP_MAJOR_VERSION >= 7 +#include +#endif + +#if PHP_MAJOR_VERSION < 7 +#define _add_next_index_string(...) add_next_index_string(__VA_ARGS__, 1) +#define _add_assoc_string(...) add_assoc_string(__VA_ARGS__, 1) +#define _add_assoc_string_ex(...) add_assoc_string_ex(__VA_ARGS__, 1) +#define _add_assoc_stringl_ex(...) add_assoc_stringl_ex(__VA_ARGS__, 1) +#define _RETURN_STRING(a) RETURN_STRING(a, 1) +#define _RETVAL_STRING(a) RETVAL_STRING(a, 1) +#define _RETVAL_STRINGL(a, b) RETVAL_STRINGL(a, b, 1) +#define _DECLARE_ZVAL(name) zval * name +#define _INIT_ZVAL INIT_ZVAL +#define _ALLOC_INIT_ZVAL(name) ALLOC_INIT_ZVAL(name) +#define _STRS ZEND_STRS +#define _zend_read_property(a, b, c, d, e, f) zend_read_property(a, b, c, d, e TSRMLS_CC) +#define _zend_register_internal_class_ex(class, parent) zend_register_internal_class_ex(class, parent, NULL TSRMLS_CC) +#define _ZVAL_STRINGL(a, b, c) ZVAL_STRINGL(a, b, c, 1) +typedef int strsize_t; +#else +#define _add_next_index_string add_next_index_string +#define _add_assoc_string(z, k, s) add_assoc_string_ex(z, k, strlen(k)+1, s) +#define _add_assoc_string_ex add_assoc_string_ex +#define _add_assoc_stringl_ex add_assoc_stringl_ex +#define _RETURN_STRING(a) RETURN_STRING(a) +#define _RETVAL_STRING(a) RETVAL_STRING(a) +#define _RETVAL_STRINGL RETVAL_STRINGL +#define _DECLARE_ZVAL(name) zval name ## _v; zval * name = &name ## _v +#define _INIT_ZVAL ZVAL_NULL +#define _ALLOC_INIT_ZVAL(name) ZVAL_NULL(name) +#define _STRS ZEND_STRL +#define _zend_read_property(a, b, c, d, e, f) zend_read_property(a, b, c, d, e, f) +#define _zend_register_internal_class_ex zend_register_internal_class_ex +#define _ZVAL_STRINGL ZVAL_STRINGL +typedef size_t strsize_t; +#endif + +#endif /* PHP_MUSTACHE_PHP5TO7 */ -- cgit