On Thu, Nov 5, 2015 at 5:20 PM, Stefan Eissing
<[email protected]> wrote:
> But if I only put them in via sth like:
>
> void h2_stream_set_add(h2_stream_set *sp, h2_stream *stream)
> {
>     apr_hash_set(sp->hash, &stream->id, sizeof(stream->id), stream);
> }
>
> the (int*) conversion to (void*) and back to (int*) should not hurt. Or?
>
> It's the only way I access the hash and its not visible outside that file...

OK, h2_stream->id is an int member, so it should always be aligned
(provided h2_stream itself is aligned, but that's another story :)
Any char* dereferenced as an integral number makes me nervous, someone
may reuse that hash function someday...
But I agree this is not necessary for now.

Reply via email to