sianla / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Report a misleading comment in memcached.hpp #311

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
171    * @param[in] key key of object to fetch
172    * @param[out] ret_val store returned object in this vector
173    * @return a memcached return structure
174    */
175   memcached_return_t fetch(std::string &key,
176                            std::vector<char> &ret_val,
177                            uint32_t &flags,
178                            uint64_t &cas_value)
Lines above said key is a input parameter, but in fact, it doesn't!

186       key.assign(memcached_result_key_value(result), 
memcached_result_key_length(result));

This line in function modify the key value, and never use the value you pass to 
the function.So the parameter must be an output parameter, not an 
input parameter.The comment told lies.

Original issue reported on code.google.com by hitwan...@gmail.com on 28 Feb 2013 at 9:13

GoogleCodeExporter commented 8 years ago
what... codebase is this?

Original comment by dorma...@rydia.net on 28 Feb 2013 at 9:09

GoogleCodeExporter commented 8 years ago
invalid, no idea what code this is.

Original comment by dorma...@rydia.net on 7 Dec 2013 at 8:35