+memcached_return memcached_fetch_execute(memcached_st *ptr,
+ memcached_execute_function *callback,
+ void *context,
+ unsigned int number_of_callbacks)
+{
+ memcached_result_st *result= &ptr->result;
+ memcached_return rc= MEMCACHED_FAILURE;
+ unsigned int x;
+
+ while ((result= memcached_fetch_result(ptr, result, &rc)) != NULL)
+ {
+ if (rc == MEMCACHED_SUCCESS)
+ {
+ for (x= 0; x < number_of_callbacks; x++)
+ {
+ rc= (*callback[x])(ptr, result, context);
+ if (rc != MEMCACHED_SUCCESS)
+ break;
+ }
+ }
+ }
+ return rc;
+}