Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

C API question

$
0
0
The string_completiion_t callback signature of the Zookeeper C API is:

typedef void(* string_completion_t)(int rc, const char *value, const void *data)

That means that when the callback is called, the user provided data is
returned as a const void and cannot be modified by client code, which
kind of defeats the purpose of passing any data in the first place.

Is there any reason why this parameter needs to be const?

Viewing all articles
Browse latest Browse all 5648

Trending Articles