typedef struct memcached_result_st memcached_result_st;
typedef struct memcached_string_st memcached_string_st;
typedef struct memcached_server_st memcached_server_st;
-typedef memcached_return (*clone_func)(memcached_st *parent, memcached_st *clone);
-typedef memcached_return (*cleanup_func)(memcached_st *ptr);
+typedef memcached_return (*memcached_clone_func)(memcached_st *parent, memcached_st *clone);
+typedef memcached_return (*memcached_cleanup_func)(memcached_st *ptr);
typedef void (*memcached_free_function)(memcached_st *ptr, void *mem);
typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t size);
typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, const size_t size);
memcached_server_distribution distribution;
void *user_data;
unsigned int wheel[MEMCACHED_WHEEL_SIZE];
- clone_func on_clone;
- cleanup_func on_cleanup;
+ memcached_clone_func on_clone;
+ memcached_cleanup_func on_cleanup;
memcached_free_function call_free;
memcached_malloc_function call_malloc;
memcached_realloc_function call_realloc;
}
case MEMCACHED_CALLBACK_CLEANUP_FUNCTION:
{
- cleanup_func func= (cleanup_func)data;
+ memcached_cleanup_func func= (memcached_cleanup_func)data;
ptr->on_cleanup= func;
break;
}
case MEMCACHED_CALLBACK_CLONE_FUNCTION:
{
- clone_func func= (clone_func)data;
+ memcached_clone_func func= (memcached_clone_func)data;
ptr->on_clone= func;
break;
}
/* Test Clone Callback */
{
- clone_func temp_function;
+ memcached_clone_func temp_function;
memcached_return rc;
rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, clone_test_callback);
assert(rc == MEMCACHED_SUCCESS);
- temp_function= (clone_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
+ temp_function= (memcached_clone_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
assert(temp_function == clone_test_callback);
}
/* Test Cleanup Callback */
{
- cleanup_func temp_function;
+ memcached_cleanup_func temp_function;
memcached_return rc;
rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, cleanup_test_callback);
assert(rc == MEMCACHED_SUCCESS);
- temp_function= (cleanup_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
+ temp_function= (memcached_cleanup_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
assert(temp_function == cleanup_test_callback);
}