[master] 13c713a Drop pointless template structure.

Poul-Henning Kamp phk at FreeBSD.org
Fri Feb 5 23:24:41 CET 2016


commit 13c713a0fb2ba303c0a49024a9b03df97b3932c8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Feb 5 22:23:46 2016 +0000

    Drop pointless template structure.

diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index ce67b35..61f566d 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -688,9 +688,9 @@ SMP_Init(void)
 	lck_smp = Lck_CreateClass("smp");
 	CLI_AddFuncs(debug_cmds);
 	smp_oc_realmethods = SML_methods;
-	smp_oc_realmethods.objupdatemeta = smp_oc_methods.objupdatemeta;
-	smp_oc_realmethods.objfree = smp_oc_methods.objfree;
 	smp_oc_realmethods.objtouch = NULL;
+	smp_oc_realmethods.objupdatemeta = smp_oc_objupdatemeta;
+	smp_oc_realmethods.objfree = smp_oc_objfree;
 }
 
 /*--------------------------------------------------------------------
diff --git a/bin/varnishd/storage/storage_persistent.h b/bin/varnishd/storage/storage_persistent.h
index 410bc48..0716458 100644
--- a/bin/varnishd/storage/storage_persistent.h
+++ b/bin/varnishd/storage/storage_persistent.h
@@ -307,8 +307,9 @@ void smp_new_seg(struct smp_sc *sc);
 void smp_close_seg(struct smp_sc *sc, struct smp_seg *sg);
 void smp_init_oc(struct objcore *oc, struct smp_seg *sg, unsigned objidx);
 void smp_save_segs(struct smp_sc *sc);
-extern const struct obj_methods smp_oc_methods;
 storage_getobj_f smp_sml_getobj;
+void smp_oc_objupdatemeta(struct worker *, struct objcore *);
+void smp_oc_objfree(struct worker *, struct objcore *);
 
 /* storage_persistent_subr.c */
 
diff --git a/bin/varnishd/storage/storage_persistent_silo.c b/bin/varnishd/storage/storage_persistent_silo.c
index 87d81e8..f46787f 100644
--- a/bin/varnishd/storage/storage_persistent_silo.c
+++ b/bin/varnishd/storage/storage_persistent_silo.c
@@ -453,7 +453,7 @@ smp_sml_getobj(struct worker *wrk, struct objcore *oc)
 	return (o);
 }
 
-static void __match_proto__(objupdatemeta_f)
+void __match_proto__(objupdatemeta_f)
 smp_oc_objupdatemeta(struct worker *wrk, struct objcore *oc)
 {
 	struct smp_seg *sg;
@@ -478,7 +478,7 @@ smp_oc_objupdatemeta(struct worker *wrk, struct objcore *oc)
 	}
 }
 
-static void __match_proto__(objfree_f)
+void __match_proto__(objfree_f)
 smp_oc_objfree(struct worker *wrk, struct objcore *oc)
 {
 	struct smp_seg *sg;
@@ -509,11 +509,6 @@ smp_oc_objfree(struct worker *wrk, struct objcore *oc)
 	memset(oc->stobj, 0, sizeof oc->stobj);
 }
 
-const struct obj_methods smp_oc_methods = {
-	.objupdatemeta =	smp_oc_objupdatemeta,
-	.objfree =		smp_oc_objfree,
-};
-
 /*--------------------------------------------------------------------*/
 
 void



More information about the varnish-commit mailing list