From 1736b938e947c5165a135c5404af70913ab53d76 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 4 Aug 2022 19:13:43 -0700 Subject: [PATCH] expr: inline private state into 'Excc_t' Now that `Excc_t` is encapsulated in excc.c and no longer considered an extensible struct, we can stop playing macro tricks to give it extra fields and just express these more naturally. --- lib/expr/excc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/expr/excc.c b/lib/expr/excc.c index ce767956e..3d648fd45 100644 --- a/lib/expr/excc.c +++ b/lib/expr/excc.c @@ -15,12 +15,6 @@ * expression library C program generator */ -#define _EX_CC_PRIVATE_ \ - char* id; /* prefix + _ */ \ - int lastop; /* last op */ \ - int tmp; /* temp var index */ \ - Exccdisc_t* ccdisc; /* excc() discipline */ - #include #include #include @@ -43,11 +37,10 @@ struct Excc_s /* excc() state */ { Expr_t* expr; /* exopen() state */ Exdisc_t* disc; /* exopen() discipline */ - -#ifdef _EX_CC_PRIVATE_ - _EX_CC_PRIVATE_ -#endif - + char* id; /* prefix + _ */ + int lastop; /* last op */ + int tmp; /* temp var index */ + Exccdisc_t* ccdisc; /* excc() discipline */ }; #define EX_CC_DUMP 0x8000 -- 2.40.0