summaryrefslogtreecommitdiff
path: root/src/value.cpp
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-28 23:11:57 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-28 23:11:57 +0200
commit5ab6927a5fa17e73161d7126ca506e5e51ba0e55 (patch)
tree321186e3f01c09c5f739725da5a06abc31104b67 /src/value.cpp
parentd69d5ca8f8f6a8c75099052f8541d7144385572c (diff)
added parameter handling, and return value handling
Diffstat (limited to 'src/value.cpp')
-rw-r--r--src/value.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/value.cpp b/src/value.cpp
index 6ba67a4..3c84d9c 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -87,15 +87,19 @@ Value::Value(double value)
/**
* Wrap object around zval
- * @param zval
+ * @param zval Value to wrap
+ * @param ref Force this to be a reference
*/
-Value::Value(struct _zval_struct *zval)
+Value::Value(struct _zval_struct *zval, bool ref)
{
// just copy the zval into this object
_val = zval;
// we see ourselves as reference too
Z_ADDREF_P(_val);
+
+ // should this be a forced reference
+ if (ref) Z_SET_ISREF_P(zval);
}
/**