From d2a2e6b3f8fafaadea39b31d9946680c2b461033 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 14 Mar 2002 06:40:07 +0000 Subject: [PATCH] Add bcs_last() macro. svn path=/trunk/yasm/; revision=496 --- libyasm/bc-int.h | 3 +++ src/bc-int.h | 3 +++ 2 files changed, 6 insertions(+) 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