diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-08-28 03:56:28 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-08-28 03:56:28 -0400 |
commit | b63fcd650a42b6035c35de951e1e8476234dd2e5 (patch) | |
tree | 93e9875c2bbea16c9fc69ed7a452cf71f3ae0ef9 | |
parent | 5d8106b969b9f6c2d530eb3c32c0065c5f5b0e35 (diff) | |
download | libfhp-b63fcd650a42b6035c35de951e1e8476234dd2e5.tar.bz2 libfhp-b63fcd650a42b6035c35de951e1e8476234dd2e5.zip |
add comments
-rw-r--r-- | env.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -24,6 +24,7 @@ fhp_strings[] = { void fhp_env_init(fhp_env_t * const env) { + // calculate hashes for common strings for (size_t i = 0; fhp_strings[i]; i++) env->hashes[i] = fhp_lc_hash_string(fhp_strings[i]); } @@ -34,10 +35,12 @@ fhp_env_t * fhp_get_default_env(void) { static fhp_env_t *r = NULL; + // lazy-init default environment if (!r) { r = &fhp_default_env; fhp_env_init(r); } + // return success return r; } |