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 | |
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')
-rw-r--r-- | include/file.h | 12 | ||||
-rw-r--r-- | include/value.h | 2 |
2 files changed, 13 insertions, 1 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(); diff --git a/include/value.h b/include/value.h index 9447fc8..363779d 100644 --- a/include/value.h +++ b/include/value.h @@ -405,7 +405,7 @@ public: char *reserve(size_t size); /** - * Get access to the raw buffer for read operationrs. + * Get access to the raw buffer for read operations. * @return const char * */ const char *rawValue() const; |