memcache/request.h
changeset 48 1c67f512779b
parent 44 03a7e064f833
child 49 10c7dce1a043
--- a/memcache/request.h	Thu Aug 28 03:14:07 2008 +0300
+++ b/memcache/request.h	Fri Aug 29 23:31:17 2008 +0300
@@ -21,11 +21,11 @@
     struct memcache_obj obj;
     struct memcache_buf buf;
 
-    // flags to indicate if we have valid obj/buf data
-    char have_obj, have_buf;
+    // flags to indicate if we have valid obj/buf data, and if buf.data was allocated by us or supplied by the user
+    char have_obj, have_buf, is_buf_ours;
 
     // our state
-    enum memcache_req_state state;
+    enum memcache_state state;
 
     // our user callback argument
     void *cb_arg;
@@ -81,12 +81,15 @@
  * The request was sent and is now done, and is not associated with the connection anymore.
  *
  * This will be called before req_reply/req_data, but not before/after req_error.
+ *
+ * The request will not be accessed anymore after calling this.
  */
 void memcache_req_done (struct memcache_req *req);
 
 /*
- * An error occurred, and the request must be abandoned. This will assume that the req is not active or enqueued
- * anymore, and the req should not be accessed by memcache_* code after this.
+ * An error occurred, and the request must be abandoned. The request is not active or enqueued anymore.
+ *
+ * The request will not be accessed anymore after calling this.
  */
 void memcache_req_error (struct memcache_req *req);