Branch: Tag:

2014-12-04

2014-12-04 19:25:08 by Arne Goedeke <el@laramies.com>

use OFFSETOF

63:      #define MD_KEYPAIRS(MD, HSIZE) \    ( (struct keypair *) \ -  DO_ALIGN( PTR_TO_INT(((struct mapping_data *)(MD))->hash + HSIZE), \ +  DO_ALIGN( PTR_TO_INT(MD) + OFFSETOF(mapping_data, hash) + HSIZE * sizeof(struct keypair *), \    ALIGNOF(struct keypair)) )    -  +  +    #ifndef PIKE_MAPPING_KEYPAIR_LOOP   #define NEW_MAPPING_LOOP(md) \    for((e=0) DO_IF_DMALLOC( ?0:(debug_malloc_touch(md)) ) ;e<(md)->hashsize;e++) for(k=(md)->hash[e];k;k=k->next)