Portability patches from Kevin Dalley for Freebsd 4.0.
[m6w6/libmemcached] / lib / memcached.c
index 9ee49d665f38338e0024301f3a366f82e74247df..24c3b8bc4048198c60e10e581f371461490a3563 100644 (file)
@@ -5,7 +5,7 @@
 
 memcached_st *memcached_create(memcached_st *ptr)
 {
-  memcached_string_st *string_ptr;
+  memcached_result_st *result_ptr;
   if (!ptr)
   {
     ptr= (memcached_st *)malloc(sizeof(memcached_st));
@@ -20,10 +20,10 @@ memcached_st *memcached_create(memcached_st *ptr)
   {
     memset(ptr, 0, sizeof(memcached_st));
   }
-  string_ptr= memcached_string_create(ptr, &ptr->result_buffer, 0);
-  WATCHPOINT_ASSERT(string_ptr);
-  ptr->poll_timeout= MEMCACHED_DEFAILT_TIMEOUT;
-  ptr->distribution= MEMCACHED_DISTRIBUTION_MODULO;
+  result_ptr= memcached_result_create(ptr, &ptr->result);
+  WATCHPOINT_ASSERT(result_ptr);
+  ptr->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT;
+  ptr->distribution= MEMCACHED_DISTRIBUTION_MODULA;
 
   return ptr;
 }
@@ -33,7 +33,7 @@ void memcached_free(memcached_st *ptr)
   /* If we have anything open, lets close it now */
   memcached_quit(ptr);
   memcached_server_list_free(ptr->hosts);
-  memcached_string_free(&ptr->result_buffer);
+  memcached_result_free(&ptr->result);
 
   if (ptr->is_allocated == MEMCACHED_ALLOCATED)
     free(ptr);