/*
+--------------------------------------------------------------------+
- | libmemcached - C/C++ Client Library for memcached |
+ | libmemcached-awesome - C/C++ Client Library for memcached |
+--------------------------------------------------------------------+
| Redistribution and use in source and binary forms, with or without |
| modification, are permitted under the terms of the BSD license. |
| the terms online at: https://opensource.org/licenses/BSD-3-Clause |
+--------------------------------------------------------------------+
| Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
- | Copyright (c) 2020 Michael Wallner <mike@php.net> |
+ | Copyright (c) 2020-2021 Michael Wallner https://awesome.co/ |
+--------------------------------------------------------------------+
*/
/* Increment count for hosts */
uint32_t count = 1;
- if (ptr != NULL) {
+ if (ptr) {
count += memcached_server_list_count(ptr);
}
memcached_string_t _hostname = {memcached_string_make_from_cstr(hostname)};
/* @todo Check return type */
- if (__server_create_with(NULL, &new_host_list[count - 1], _hostname, port, weight,
- port ? MEMCACHED_CONNECTION_TCP : MEMCACHED_CONNECTION_UNIX_SOCKET)
+ if (server_create_with(NULL, &new_host_list[count - 1], _hostname, port, weight,
+ port ? MEMCACHED_CONNECTION_TCP : MEMCACHED_CONNECTION_UNIX_SOCKET)
== NULL)
{
#if 0
}
#if 0
- // Handset allocated since
+ // Handset allocated since
new_host_list->options.is_allocated= true;
#endif
assert_msg(not memcached_is_allocated(&self[x]),
"You have called memcached_server_list_free(), but you did not pass it a valid "
"memcached_server_list_st");
- __server_free(&self[x]);
+ server_free(&self[x]);
}
libmemcached_free(self->root, self);
assert_msg(memcached_is_allocated(&self[x]) == false,
"You have called memcached_server_list_free(), but you did not pass it a valid "
"memcached_server_list_st");
- __instance_free(&self[x]);
+ instance_free(&self[x]);
}
libmemcached_free(self->root, self);