[CRIU] Re: [PATCH 0/4] protobuf series updated
Stanislav Kinsbursky
skinsbursky at parallels.com
Mon Jul 9 05:10:11 EDT 2012
09.07.2012 13:01, Cyrill Gorcunov пишет:
> 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?
>
No, from my POW. It's just a description with few words of possible problems in
future.
And there is no a single word present, why we introduce such crappy functions
and what for. And why don't we do it in another way.
--
Best regards,
Stanislav Kinsbursky
More information about the CRIU
mailing list