summaryrefslogtreecommitdiff
path: root/src/mod_magnet_cache.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-06-09 05:03:23 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-08-27 02:16:53 -0400
commite86dba5468cdca00acdcc3dd706d5c9277429f1e (patch)
tree63c41d119dae3cd02445f77f4116a841b2d8f347 /src/mod_magnet_cache.h
parentd5366c0aeeb749e14342e01d0aa03c0f99278c95 (diff)
downloadlighttpd-git-e86dba5468cdca00acdcc3dd706d5c9277429f1e.tar.gz
[mod_magnet] inline name and etag buffers in cache
also mark cache init and cache free funcs as cold
Diffstat (limited to 'src/mod_magnet_cache.h')
-rw-r--r--src/mod_magnet_cache.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mod_magnet_cache.h b/src/mod_magnet_cache.h
index da56612d..587fa27b 100644
--- a/src/mod_magnet_cache.h
+++ b/src/mod_magnet_cache.h
@@ -8,8 +8,8 @@
#include <lua.h>
typedef struct {
- buffer *name;
- buffer *etag;
+ buffer name;
+ buffer etag;
lua_State *L;
} script;
@@ -21,13 +21,15 @@ typedef struct {
} script_cache;
#if 0
+__attribute_cold__
__attribute_malloc__
__attribute_returns_nonnull__
script_cache *script_cache_init(void);
#endif
+__attribute_cold__
void script_cache_free_data(script_cache *cache);
-lua_State *script_cache_get_script(script_cache *cache, buffer *name, int etag_flags);
+lua_State *script_cache_get_script(script_cache *cache, const buffer *name, int etag_flags);
#endif