summaryrefslogtreecommitdiff
path: root/include/call.h
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-04-14 00:36:01 +0600
committervalmat <ufabiz@gmail.com>2014-04-14 00:36:01 +0600
commit06ca40ff782231f58d629b09004700714d96fa0c (patch)
tree4145bb0adaa205a01eb34b50c8ff690729c5d02b /include/call.h
parente6660c521ea5d03e0caffa2a1f69e6e28982ab8b (diff)
Separated class IniValue from class Ini
Also replaced Ini::get() on ini_get() see https://github.com/CopernicaMarketingSoftware/PHP-CPP/issues/64#issuecomment-40313791
Diffstat (limited to 'include/call.h')
-rw-r--r--include/call.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/call.h b/include/call.h
index 2fcc9b0..f881782 100644
--- a/include/call.h
+++ b/include/call.h
@@ -57,7 +57,16 @@ inline Value echo(const std::string &input) { out << input; return nullptr; }
inline Value empty(const Value &value) { return value.isNull() || !value.boolValue(); }
inline Value empty(const HashMember<std::string> &member) { return !member.exists() || empty(member.value()); }
inline Value empty(const HashMember<int> &member) { return !member.exists() || empty(member.value()); }
-inline Value ini_get(const Value &value) { return call("ini_get", value); }
+
+inline IniValue ini_get(const char* name)
+{
+ return IniValue(name, false);
+}
+inline IniValue ini_get_orig(const char* name)
+{
+ return IniValue(name, true);
+}
+
inline Value is_array(const Value &value) { return value.isArray(); }
inline Value strlen(const Value &value) { return call("strlen", value); }
inline void unset(const HashMember<std::string> &member) { member.unset(); }