diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-07-08 15:03:43 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-07-08 15:03:43 +0200 |
commit | d0dbed9ed21123455adcd0277991036ad9bdbb06 (patch) | |
tree | ce05d22dc2f730d5a9eb479b3e198622fda6c10c | |
parent | ca60a32c601fe9b0236d3d4717c7b94368a3c172 (diff) |
in the documentation and source code comments, the old method name Value::resize() was used, while the actual name is reserve(), solves issue #102
-rw-r--r-- | documentation/variables.html | 6 | ||||
-rw-r--r-- | include/value.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/documentation/variables.html b/documentation/variables.html index 98a6d49..dfc5b18 100644 --- a/documentation/variables.html +++ b/documentation/variables.html @@ -223,10 +223,10 @@ Php::Value readExample2(int fd) // result variable Php::Value result; - // resize the buffer to 4096 bytes, the resize() method resizes + // resize the buffer to 4096 bytes, the reserve() method resizes // the internal buffer to the appropriate size, and returns a pointer // to the buffer - char *buffer = result.resize(4096); + char *buffer = result.reserve(4096); // read in the bytes directly into the just allocated buffer ssize_t bytes = read(fd, buffer, 4096); @@ -235,7 +235,7 @@ Php::Value readExample2(int fd) // resize the buffer to the actual number of bytes in it (this // is necessary, otherwise the PHP strlen() returns 4096 even // when less bytes were available - result.resize(bytes); + result.reserve(bytes); // return the result return result; diff --git a/include/value.h b/include/value.h index e8337a0..f72304c 100644 --- a/include/value.h +++ b/include/value.h @@ -387,7 +387,7 @@ public: * variables - other variables return nullptr. * * If you are going to write to the buffer, make sure that you first call - * the resize() method to ensure that the buffer is big enough. + * the reserve() method to ensure that the buffer is big enough. * * @return char * */ @@ -396,7 +396,7 @@ public: /** * Resize buffer space. If you want to write directly to the buffer (which * is returned by the buffer() method), you should first reserve enough - * space in it. This can be done with this resize() method. This will also + * space in it. This can be done with this reserve() method. This will also * turn the Value object into a string (if it was not already a string). * The writable buffer is returned. * |