From a46d7db837474d056869c8f2c02caade461e803b Mon Sep 17 00:00:00 2001 From: kavyabhand Date: Sun, 2 Aug 2026 16:01:57 +0530 Subject: [PATCH] Make next_token static to avoid global symbol collisions next_token was the only internal helper without static and is not in tinyexpr.h. Linking against another TU that defines next_token can silently bind the wrong function under --allow-multiple-definition or LD_PRELOAD. Fixes accidental export; see issue discussion. --- tinyexpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyexpr.c b/tinyexpr.c index 176e8d0..55c5494 100755 --- a/tinyexpr.c +++ b/tinyexpr.c @@ -236,7 +236,7 @@ static double negate(double a) {return -a;} static double comma(double a, double b) {(void)a; return b;} -void next_token(state *s) { +static void next_token(state *s) { s->type = TOK_NULL; do {