[master] 5e03b60d5 Make generate.py emit struct vrt_type
Poul-Henning Kamp
phk at FreeBSD.org
Thu Feb 4 08:04:08 UTC 2021
commit 5e03b60d5fa4f55cec53d99bbfbaee7950ab8174
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Feb 4 07:41:54 2021 +0000
Make generate.py emit struct vrt_type
diff --git a/include/vrt.h b/include/vrt.h
index 899f8c85a..5b49c1d5e 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -53,6 +53,8 @@
* binary/load-time compatible, increment MAJOR version
*
* 13.0 (2021-03-15)
+ * struct vrt_type now produced by generate.py
+ * VRT_acl_log() moved to VPI_acl_log()
* VRT_Endpoint_Clone() added.
* Calling convention for VDP implementation changed
* VRT_ValidHdr() added.
@@ -286,15 +288,6 @@ typedef vtim_real VCL_TIME;
typedef struct vcl * VCL_VCL;
typedef void VCL_VOID;
-struct vrt_type {
- unsigned magic;
-#define VRT_TYPE_MAGIC 0xa943bc32
- const char *lname;
- const char *uname;
- const char *ctype;
- size_t szof;
-};
-
enum lbody_e {
LBODY_SET,
LBODY_ADD,
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index dd614f97f..238969bcc 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -646,6 +646,17 @@ for i in sorted(rets.keys()):
fo.write("\n" + tbl40("#define VCL_RET_MAX", "%d\n" % n))
fo.write("\n/* VCL Types */\n")
+fo.write('''
+struct vrt_type {
+\tunsigned\t\tmagic;
+#define VRT_TYPE_MAGIC\t\t0xa943bc32
+\tconst char\t\t*lname;
+\tconst char\t\t*uname;
+\tconst char\t\t*ctype;
+\tsize_t\t\t\tszof;
+};
+
+''')
for vcltype in sorted(vcltypes.keys()):
fo.write("extern const struct vrt_type VCL_TYPE_%s[1];\n" % vcltype)
More information about the varnish-commit
mailing list