summaryrefslogtreecommitdiff
path: root/src/argument.cpp
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/argument.cpp
parente84fb687091e7093f9aa72f74ce4e678ab84e5f3 (diff)
add macros for PHP 5.3
Diffstat (limited to 'src/argument.cpp')
-rw-r--r--src/argument.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/argument.cpp b/src/argument.cpp
index 7dbf624..e8e7c8a 100644
--- a/src/argument.cpp
+++ b/src/argument.cpp
@@ -28,7 +28,9 @@ Argument::Argument(const char *name, Type type, bool required, bool byref)
// fill members
_info->name = name;
_info->name_len = strlen(name);
+#if PHP_VERSION_ID >= 50400
_info->type_hint = type == arrayType || type == callableType ? type : 0;
+#endif
_info->class_name = NULL;
_info->class_name_len = 0;
_info->allow_null = false;
@@ -54,7 +56,9 @@ Argument::Argument(const char *name, const char *classname, bool nullable, bool
// fill members
_info->name = name;
_info->name_len = strlen(name);
+#if PHP_VERSION_ID >= 50400
_info->type_hint = objectType;
+#endif
_info->class_name = classname;
_info->class_name_len = strlen(classname);
_info->allow_null = nullable;