diff options
author | 2005-10-27 00:48:23 +1000 | |
---|---|---|
committer | 2005-10-27 00:48:23 +1000 | |
commit | c8bc79005cd3e844170b9116cf5b98f2330df653 (patch) | |
tree | edac321c5e586f36b59d6553b764c77bd0ad6df5 /expand.c | |
parent | 5ba0affdd7b18ed970c039961b75da2cb925d6cd (diff) |
Minor performance tweak: Do not allocate any heap memory for hash_table_t until an element is inserted. That way, hash tables that never contain any data will not cause a call to malloc()
darcs-hash:20051026144823-ac50b-570dfe169a2ce693458c493e8f103884de3c5078.gz
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -88,11 +88,11 @@ parameter expansion. #define UNCLEAN L"$*?\\\"'({})" /** - Test if the specified argument is clean, i.e. it does not contin - any tokens which are expanded. Clean strings can be passed through - expand_string and expand_one without changing them. About 90% of - all strings are clean, so skipping expantion on them actually does - save a small amount of time. + Test if the specified argument is clean, i.e. it does not contain + any tokens which need to be expanded or otherwise altered. Clean + strings can be passed through expand_string and expand_one without + changing them. About 90% of all strings are clean, so skipping + expantion on them actually does save a small amount of time. */ static int is_clean( const wchar_t *in ) { @@ -114,7 +114,7 @@ static int is_clean( const wchar_t *in ) } /** - Return the environment variable value for the string starting at in + Return the environment variable value for the string starting at \c in. */ static wchar_t *expand_var( wchar_t *in ) { |