[master] 79373b9b5 Kill dead vmod.constructor descriptor check

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Nov 28 06:20:07 UTC 2019


commit 79373b9b59752663e4004b399abf7a809c1b5c1b
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Nov 28 07:14:10 2019 +0100

    Kill dead vmod.constructor descriptor check
    
    There's only one place where a symbol may be assigned the SYM_OBJECT
    kind and it is ensured that the JSON descriptor is found and added to
    the symbol.

diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index 846f6d502..2ff90ad31 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -405,14 +405,6 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
 	sy2 = VCC_SymbolGet(tl, SYM_OBJECT, SYMTAB_EXISTING, XREF_NONE);
 	ERRCHK(tl);
 	AN(sy2);
-	if (sy2->eval_priv == NULL) {
-		VSB_printf(tl->sb, "Constructor not found: ");
-		vcc_ErrToken(tl, t);
-		VSB_printf(tl->sb, " at ");
-		vcc_ErrWhere(tl, t);
-		return;
-	}
-
 	CAST_OBJ_NOTNULL(vv, sy2->eval_priv, VJSN_VAL_MAGIC);
 	// vv = object name
 


More information about the varnish-commit mailing list