[PATCH] Make struct tevent_req opaque 2

simo idra at samba.org
Sun Mar 1 00:50:45 GMT 2009


On Sat, 2009-02-28 at 16:01 -0500, simo wrote:
> This patch makes struct tevent_req opaque to callers by moving it to
> tevent_internal.h and add helpers functions to set async.fn,
> async.private_data an private_status
> 
> This allows the library developer to change or extend tevent_req later
> without breaking API and ABI.
> 
> I suggest the same change should be done to async_req.

Updated patch.

After some discussion with Volker, we decide to shorten the names of
tevent_req_get_private_data() into _tevent_req_callback_data()
and
tevent_req_get_private_state() into _tevent_req_state()

and created tevent_req_callback_data() and tevent_req_state() similar to
tevent_req_create() so that we abort if types do not match.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-struct-tevent_req-opaque.patch
Type: text/x-patch
Size: 17436 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090228/329a1eae/0001-Make-struct-tevent_req-opaque.bin


More information about the samba-technical mailing list