diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-28 23:11:57 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-28 23:11:57 +0200 |
commit | 5ab6927a5fa17e73161d7126ca506e5e51ba0e55 (patch) | |
tree | 321186e3f01c09c5f739725da5a06abc31104b67 /src/value.cpp | |
parent | d69d5ca8f8f6a8c75099052f8541d7144385572c (diff) |
added parameter handling, and return value handling
Diffstat (limited to 'src/value.cpp')
-rw-r--r-- | src/value.cpp | 8 |
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); } /** |