From: Peter Johnson Date: Thu, 14 Mar 2002 06:40:07 +0000 (-0000) Subject: Add bcs_last() macro. X-Git-Tag: v0.1.0~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2a2e6b3f8fafaadea39b31d9946680c2b461033;p=yasm Add bcs_last() macro. svn path=/trunk/yasm/; revision=496 --- diff --git a/libyasm/bc-int.h b/libyasm/bc-int.h index 2c3d31f4..793af589 100644 --- a/libyasm/bc-int.h +++ b/libyasm/bc-int.h @@ -73,4 +73,7 @@ const void *bc_get_const_data(const bytecode *); #define bcs_next(x) STAILQ_NEXT(x, link) +/* @null@ bytecode *bcs_last(bytecodehead *headp); */ +#define bcs_last(headp) STAILQ_LAST(headp, bytecode, link) + #endif diff --git a/src/bc-int.h b/src/bc-int.h index 2c3d31f4..793af589 100644 --- a/src/bc-int.h +++ b/src/bc-int.h @@ -73,4 +73,7 @@ const void *bc_get_const_data(const bytecode *); #define bcs_next(x) STAILQ_NEXT(x, link) +/* @null@ bytecode *bcs_last(bytecodehead *headp); */ +#define bcs_last(headp) STAILQ_LAST(headp, bytecode, link) + #endif