summaryrefslogtreecommitdiff
path: root/src/argument.cpp
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-02 11:33:53 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-02 11:33:53 +0100
commit52fe0c39457421e075959179ee6b64a20b96f0d9 (patch)
treee6dd000114d104bf6286d74682feb694b3cb97a3 /src/argument.cpp
parentfa02aa127d2c4261d15123829e44f6d997444abc (diff)
types are not a C++11 class, introduced FixedValue class that can not change type, and implemented both Object and Array to make use of that type, implemented - but not yet tested - Base::value() method
Diffstat (limited to 'src/argument.cpp')
-rw-r--r--src/argument.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/argument.cpp b/src/argument.cpp
index e8e7c8a..080bf79 100644
--- a/src/argument.cpp
+++ b/src/argument.cpp
@@ -29,7 +29,7 @@ Argument::Argument(const char *name, Type type, bool required, bool byref)
_info->name = name;
_info->name_len = strlen(name);
#if PHP_VERSION_ID >= 50400
- _info->type_hint = type == arrayType || type == callableType ? type : 0;
+ _info->type_hint = (unsigned char)(type == Type::Array || type == Type::Callable ? type : Type::Null);
#endif
_info->class_name = NULL;
_info->class_name_len = 0;
@@ -57,7 +57,7 @@ Argument::Argument(const char *name, const char *classname, bool nullable, bool
_info->name = name;
_info->name_len = strlen(name);
#if PHP_VERSION_ID >= 50400
- _info->type_hint = objectType;
+ _info->type_hint = (unsigned char)Type::Object;
#endif
_info->class_name = classname;
_info->class_name_len = strlen(classname);