Comment 6 for bug 1190240

Revision history for this message
Marc Abramowitz (msabramo) wrote :

Here are the declarations for memcached_server_name and memcached_server_port from http://bazaar.launchpad.net/~tangent-trunk/libmemcached/1.0/view/head:/libmemcached-1.0/server.h#L103 (these declarations also appear in libmemcached-1.0.17):

```C
LIBMEMCACHED_API
const char *memcached_server_name(const memcached_instance_st * self);

LIBMEMCACHED_API
in_port_t memcached_server_port(const memcached_instance_st * self);
```

Note that they take a memcached_instance_st * as an argument.

So I am thinking that you want us to now use memcached_instance_st * in place of memcached_server_instance_st?

I would still contend that it would be nice to maintain the typedef for backward compatibility, at least until there is a major version bump. Changing the API during a patch level version bump is surprising and makes it difficult for folks that build software that uses libmemcached. For example, it looks like pylibmc will have to have this bit of #ifdef ugliness:

```C
static memcached_return
_PylibMC_AddServerCallback(memcached_st *mc,
#if LIBMEMCACHED_VERSION_HEX >= 0x01000017
                           memcached_instance_st instance,
#elif LIBMEMCACHED_VERSION_HEX >= 0x00039000
                           memcached_server_instance_st instance,
#else
                           memcached_server_st *server,
#endif
                           void *user) {
...
}
```