diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2011-12-03 11:07:41 -0800 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2011-12-03 11:07:41 -0800 |
commit | 13e87955a6610317dd90b29b116edd5196cbcd56 (patch) | |
tree | 258870d269e2aeeb6f1ef727b26dae09e003132e /ascii.c | |
parent | 4ea6c922a9763cd7268d1808088c09965bf85063 (diff) |
Inline some small, often-used functions (closes #3551)
When I first sent this patch to the mailing list in 2008, my benchmarking found a
reduction in startup time of 15%.
Diffstat (limited to 'ascii.c')
-rw-r--r-- | ascii.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,17 +34,17 @@ #include <stdlib.h> #include "ascii.h" -int ascii_isupper (int c) +inline int ascii_isupper (int c) { return (c >= 'A') && (c <= 'Z'); } -int ascii_islower (int c) +inline int ascii_islower (int c) { return (c >= 'a') && (c <= 'z'); } -int ascii_toupper (int c) +inline int ascii_toupper (int c) { if (ascii_islower (c)) return c & ~32; @@ -52,7 +52,7 @@ int ascii_toupper (int c) return c; } -int ascii_tolower (int c) +inline int ascii_tolower (int c) { if (ascii_isupper (c)) return c | 32; |