docs: gzip manpages
[m6w6/libmemcached] / libmemcached / result.cc
index e7bac559d6456cc17d1bcfb890442dccf62c0a18..6fa507b28e60bf541105cee7ec34c82c7040e3aa 100644 (file)
@@ -2,7 +2,7 @@
  * 
  *  Libmemcached library
  *
- *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/
  *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -45,7 +45,7 @@
 #include <libmemcached/common.h>
 
 static inline void _result_init(memcached_result_st *self,
-                                memcached_st *memc)
+                                Memcached *memc)
 {
   self->item_flags= 0;
   self->item_expiration= 0;
@@ -57,10 +57,10 @@ static inline void _result_init(memcached_result_st *self,
   self->item_key[0]= 0;
 }
 
-memcached_result_st *memcached_result_create(const memcached_st *memc,
+memcached_result_st *memcached_result_create(const memcached_st *shell,
                                              memcached_result_st *ptr)
 {
-  WATCHPOINT_ASSERT(memc);
+  const Memcached* memc= memcached2Memcached(shell);
 
   /* Saving malloc calls :) */
   if (ptr)
@@ -162,6 +162,12 @@ size_t memcached_result_length(const memcached_result_st *self)
   return memcached_string_length(sptr);
 }
 
+char *memcached_result_take_value(memcached_result_st *self)
+{
+  memcached_string_st *sptr= &self->value;
+  return memcached_string_take_value(sptr);
+}
+
 uint32_t memcached_result_flags(const memcached_result_st *self)
 {
   return self->item_flags;