case EAI_SYSTEM:
{
- static memcached_string_t mesg= { memcached_string_make("getaddrinfo") };
+ static memcached_string_t mesg= { memcached_literal_param("getaddrinfo") };
return memcached_set_errno(*server, errno, &mesg);
}
case EAI_BADFLAGS:
self.hostname, int(self.port));
}
- memcached_string_t error_host= { size, hostname_port_message };
+ memcached_string_t error_host= { hostname_port_message, size };
_set((memcached_st*)self.root, &error_host, rc);
char hostname_port[NI_MAXHOST +NI_MAXSERV + sizeof("host : ")];
int size= snprintf(hostname_port, sizeof(hostname_port), "host: %s:%d", self.hostname, int(self.port));
- memcached_string_t error_host= { size, hostname_port };
+ memcached_string_t error_host= { hostname_port, size};
_set((memcached_st*)self.root, &error_host, rc);
self.hostname, int(self.port));
}
- memcached_string_t error_host= { size, hostname_port_message };
+ memcached_string_t error_host= { hostname_port_message, size };
self.cached_errno= local_errno; // Store in the actual server
memcached_return_t rc= MEMCACHED_ERRNO;
#ifdef __cplusplus
#define memcached_literal_param(X) (X), (static_cast<size_t>((sizeof(X) - 1)))
-#define memcached_string_make(X) (static_cast<size_t>((sizeof(X) - 1))), (X)
#else
#define memcached_literal_param(X) (X), ((size_t)((sizeof(X) - 1)))
-#define memcached_string_make(X) (((size_t)((sizeof(X) - 1))), (X)
#endif
#define memcached_string_make_from_cstr(X) (X), ((X) ? strlen(X) : 0)