summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argument.cpp6
-rw-r--r--src/callable.cpp7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/argument.cpp b/src/argument.cpp
index fc9d720..627ee05 100644
--- a/src/argument.cpp
+++ b/src/argument.cpp
@@ -22,7 +22,7 @@ namespace PhpCpp {
*/
Argument::Argument(const std::string &name, const std::string &classname, bool null, bool ref)
{
- _refcount = new int[1];
+ _refcount = new int(1);
_info = new ArgInfo(name, classname, null, ref);
}
@@ -35,7 +35,7 @@ Argument::Argument(const std::string &name, const std::string &classname, bool n
*/
Argument::Argument(const std::string &name, Type type, bool ref)
{
- _refcount = new int[1];
+ _refcount = new int(1);
_info = new ArgInfo(name, type, ref);
}
@@ -46,7 +46,7 @@ Argument::Argument(const std::string &name, Type type, bool ref)
*/
Argument::Argument(const std::string &name, bool ref)
{
- _refcount = new int[1];
+ _refcount = new int(1);
_info = new ArgInfo(name, ref);
}
diff --git a/src/callable.cpp b/src/callable.cpp
index 929f39c..7cba919 100644
--- a/src/callable.cpp
+++ b/src/callable.cpp
@@ -160,6 +160,13 @@ int Callable::invoke(INTERNAL_FUNCTION_PARAMETERS)
ret["2"] = 3;
+// ret["hmm"]["s"] = 456;
+
+ Value sub;
+ sub["something"] = "yes";
+
+ ret["b"] = sub;
+
std::cout << "done setting properties" << std::endl;