Commit 13e87955 authored by Dan Fandrich's avatar Dan Fandrich

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%.
parent 4ea6c922
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment