From 4c2732a1dad1de295c9219ee3afac007b2d7ba05 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 28 Jan 2009 14:36:08 -0800 Subject: Use 'static' as much as possible This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results. --- tapset/errno.stp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tapset/errno.stp') diff --git a/tapset/errno.stp b/tapset/errno.stp index 2523d846..eda9bff1 100644 --- a/tapset/errno.stp +++ b/tapset/errno.stp @@ -9,7 +9,7 @@ %{ #define N(a) [a]=#a -const char * const errlist[] = { +static const char * const errlist[] = { /* from asm-generic/errno-base.h */ [1] = "EPERM", [2] = "ENOENT", @@ -340,7 +340,7 @@ const char * const errlist[] = { #endif }; #undef N -const int Maxerrno = sizeof(errlist)/sizeof(char *); +static const int Maxerrno = sizeof(errlist)/sizeof(char *); %} function errno_str:string (err:long) %{ /* pure */ -- cgit