summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-29 19:18:10 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-29 19:18:10 +0200
commitb8d747580db76bc3e51bae6c3cdae49b5b44e20b (patch)
tree4538aa1ba20f579e887881d572440f60e1d3db5a /src
parent3537cce27590c6197ffe458ac6cc7dee39040e7b (diff)
work in progress on nested arrays (still crashes with sigsegv)
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;