diff --git a/include/pairmap.h b/include/pairmap.h index 628dc2b..50f5d8c 100644 --- a/include/pairmap.h +++ b/include/pairmap.h @@ -8,7 +8,7 @@ * to be copied. This requires at least 3 things - set the x value, set the y value, call the * hash table function the requires the key. These macros take care of these three things. */ -#define PAIRMAP_PUT(map, tmp, newx, newy, data) do { (tmp)->x = newx; (tmp)->y = newy; ht_put(map, tmp, data); } while(0) +#define PAIRMAP_PUT(map, tmp, newx, newy, data) ((tmp)->x = newx, (tmp)->y = newy, ht_put(map, tmp, data)) #define PAIRMAP_GET(map, tmp, newx, newy) ((tmp)->x = newx, (tmp)->y = newy, ht_get(map, tmp)) #include "ht.h"