parent 1fe5961b
...@@ -99,6 +99,11 @@ task_unref_var(void *ptr) { ...@@ -99,6 +99,11 @@ task_unref_var(void *ptr) {
unref_var((struct vmod_globalvar_var *) ptr); unref_var((struct vmod_globalvar_var *) ptr);
} }
static const struct vmod_priv_methods priv_task_methods[1] = {{
.magic = VMOD_PRIV_METHODS_MAGIC,
.type = "vmod_globalvar_priv_task",
.fini = task_unref_var
}};
static const void * static const void *
task_ref_var(VRT_CTX, struct vmod_globalvar_var *v, unsigned magic) { task_ref_var(VRT_CTX, struct vmod_globalvar_var *v, unsigned magic) {
...@@ -119,7 +124,7 @@ task_ref_var(VRT_CTX, struct vmod_globalvar_var *v, unsigned magic) { ...@@ -119,7 +124,7 @@ task_ref_var(VRT_CTX, struct vmod_globalvar_var *v, unsigned magic) {
if (t->priv == NULL) { if (t->priv == NULL) {
ref_var(v); ref_var(v);
t->priv = v; t->priv = v;
t->free = task_unref_var; t->methods = priv_task_methods;
} }
assert(t->priv == v); assert(t->priv == v);
......
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