summaryrefslogtreecommitdiff
path: root/include/file.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-11 13:00:02 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-11 13:00:02 +0100
commit1c663ea116121469e37ad2cb9480387c16c0236b (patch)
tree06bf80d81f47d0c81b9cbdbccf7da9db61490022 /include/file.h
parent1efade1a7667e4e1a34265fb3cf310faf8c80bb6 (diff)
fixed memory leak when executing php code using the Opcodes class, fixed possible double-free when path passed to File class was absolute, added extra constructors to the File class
Diffstat (limited to 'include/file.h')
-rw-r--r--include/file.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/file.h b/include/file.h
index 093431e..6e24516 100644
--- a/include/file.h
+++ b/include/file.h
@@ -38,6 +38,18 @@ public:
File(const char *name) : File(name, ::strlen(name)) {}
/**
+ * Alternative constructor with a string object
+ * @param name the filename
+ */
+ File(const std::string &name) : File(name.c_str(), name.size()) {}
+
+ /**
+ * Alternative constructor with a Value object
+ * @param name the filename
+ */
+ File(const Value &value) : File(value.stringValue()) {}
+
+ /**
* Destructor
*/
virtual ~File();