summaryrefslogtreecommitdiff
path: root/include/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/value.h')
-rw-r--r--include/value.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/value.h b/include/value.h
index 72bd895..a1dd593 100644
--- a/include/value.h
+++ b/include/value.h
@@ -357,6 +357,12 @@ public:
bool isCallable() const;
/**
+ * Is the variable empty?
+ * @return bool
+ */
+ bool isEmpty() const;
+
+ /**
* Retrieve the value as number
* @return long
*/
@@ -802,6 +808,12 @@ private:
*/
Value exec(const char *name, int argc, struct _zval_struct ***params);
+ /**
+ * Refcount - the number of references to the value
+ * @return int
+ */
+ int refcount();
+
protected:
/**
* The wrapped zval
@@ -810,6 +822,19 @@ protected:
struct _zval_struct *_val;
/**
+ * Detach the zval
+ *
+ * This will unlink the zval internal structure from the Value object,
+ * so that the destructor will not reduce the number of references and/or
+ * deallocate the zval structure. This is used for functions that have to
+ * return a zval pointer, that would otherwise be deallocated the moment
+ * the function returns.
+ *
+ * @return zval
+ */
+ struct _zval_struct *detach();
+
+ /**
* Set a certain property without running any checks (you must already know
* for sure that this is an array, and that the index is not yet in use)
*
@@ -836,6 +861,7 @@ protected:
*/
friend class Globals;
friend class Member;
+ friend class ClassBase;
};
/**