[CRIU] Re: [PATCH 0/4] protobuf series updated
Cyrill Gorcunov
gorcunov at openvz.org
Mon Jul 9 05:01:01 EDT 2012
On Mon, Jul 09, 2012 at 12:29:05PM +0400, Stanislav Kinsbursky wrote:
> 07.07.2012 01:03, Cyrill Gorcunov пишет:
> >Please take a look, thanks.
> >
>
> I like the patch set. So ack.
> But I don't see descriptive comment for this hack with void pointers
> for protobuf helper functions.
>
> I believe, that just above the declaration of the helpers something
> like this should present:
> "
> NOTE: Passing of void pointer to protobuf helpers is a dirty ugly hack.
> But this is the best solution, because otherwise ... < proper
> descriptive explanation, why >
> "
protobuf.h
----------
/*
* ATTENTION
*
* This typdefs represent "generic" prototypes for
* pack/unpack/getsize functions generated by PB
* engine, thus (!!!) if PB engine change arguments
* order or their number we may meet serious problems.
*
* FIXME
*
* Find a way to verify PB generated functions statemens
* to match this typedefs.
*/
typedef size_t (pb_getpksize_t)(void *obj);
typedef size_t (pb_pack_t)(void *obj, void *where);
typedef void *(pb_unpack_t)(void *allocator, size_t size, void *from);
isn't that enough?
Cyrill
More information about the CRIU
mailing list