kore

a fork of the worlds most advanced web framework
Log | Files | Refs | README | LICENSE

commit 6c18856a3e425f321516fac529767e92fe212897
parent 78ff364c8de6218a18b4da869bb8b0af72786222
Author: Joris Vink <joris@coders.se>
Date:   Sun,  9 Jun 2019 23:24:53 +0200

get rid of mtime in modules.

kore should always reload things when it was told to reload things.
there are use cases were a module reload is because the code itself changed.

Diffstat:
Minclude/kore/kore.h | 1-
Msrc/module.c | 6------
2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/include/kore/kore.h b/include/kore/kore.h @@ -350,7 +350,6 @@ struct kore_module { char *path; char *onload; int type; - time_t mtime; struct kore_runtime_call *ocb; struct kore_module_functions *fun; diff --git a/src/module.c b/src/module.c @@ -80,10 +80,8 @@ kore_module_load(const char *path, const char *onload, int type) fatal("stat(%s): %s", path, errno_s); module->path = kore_strdup(path); - module->mtime = st.st_mtime; } else { module->path = NULL; - module->mtime = 0; } switch (module->type) { @@ -153,9 +151,6 @@ kore_module_reload(int cbs) continue; } - if (module->mtime == st.st_mtime) - continue; - if (module->ocb != NULL && cbs == 1) { ret = kore_runtime_onload(module->ocb, KORE_MODULE_UNLOAD); @@ -166,7 +161,6 @@ kore_module_reload(int cbs) } } - module->mtime = st.st_mtime; module->fun->reload(module); if (module->onload != NULL) {