diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-11 13:00:02 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-11 13:00:02 +0100 |
commit | 1c663ea116121469e37ad2cb9480387c16c0236b (patch) | |
tree | 06bf80d81f47d0c81b9cbdbccf7da9db61490022 /include/file.h | |
parent | 1efade1a7667e4e1a34265fb3cf310faf8c80bb6 (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.h | 12 |
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(); |