[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17019761#comment-17019761
 ] 

Tudor Bosman commented on ZOOKEEPER-2128:
-----------------------------------------

Frankly, this is a bit embarrassing, as using the API requires a cast, but the 
code otherwise works. (It was unnoticed because the code uses void* internally, 
and C allows unchecked casts between void* and any type).

 

In C++, I had to do this to make it usable: 
[https://gist.github.com/tudor/6bb56cc11bc7f9d986413c9561380ac3]

> zoo_aremove_watchers API is incorrect
> -------------------------------------
>
>                 Key: ZOOKEEPER-2128
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2128
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.6.0
>            Reporter: Dave Gosselin
>            Assignee: Dave Gosselin
>            Priority: Major
>             Fix For: 3.5.7, 3.7.0
>
>
> The C API for zoo_aremove_watchers incorrectly specifies the seventh argument 
> as a pointer to a function pointer.  It should be simply a function pointer 
> only.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to