summaryrefslogtreecommitdiff
path: root/src/stringmember.h
diff options
context:
space:
mode:
authorGu Weigang <guweigang@outlook.com>2013-12-13 13:29:34 +0800
committerGu Weigang <guweigang@outlook.com>2013-12-13 13:29:34 +0800
commit7c042cfcee984e16e7024a661c95d2cd3eb0b50b (patch)
tree1ea956b13fa9108c6b29e7505b998ea2d75954db /src/stringmember.h
parente84fb687091e7093f9aa72f74ce4e678ab84e5f3 (diff)
add macros for PHP 5.3
Diffstat (limited to 'src/stringmember.h')
-rw-r--r--src/stringmember.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stringmember.h b/src/stringmember.h
index 83432e3..d5af4a5 100644
--- a/src/stringmember.h
+++ b/src/stringmember.h
@@ -58,7 +58,11 @@ public:
*/
virtual void declare(struct _zend_class_entry *entry, const char *name, int size, int flags)
{
- zend_declare_property_stringl(entry, name, size, _value.c_str(), _value.size(), flags);
+#if PHP_VERSION_ID >= 50400
+ zend_declare_property_stringl(entry, name, size, _value.c_str(), _value.size(), flags);
+#else
+ zend_declare_property_stringl(entry, (char*) name, size, (char *) _value.c_str(), _value.size(), flags);
+#endif
}
};