From a4db17592949bbc22d9c3a97e52d228ba3d3ec81 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 6 Sep 2018 21:58:11 -0700 Subject: Removed unnecessary struct definition with "int a". --- tools/make_c_api.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/make_c_api.lua b/tools/make_c_api.lua index cf1cfdc..bf79b26 100644 --- a/tools/make_c_api.lua +++ b/tools/make_c_api.lua @@ -343,7 +343,12 @@ local function write_h_file(filedef, append) -- Forward-declare types defined in this file. for msg in filedef:defs(upb.DEF_MSG) do local msgname = to_cident(msg:full_name()) - append('typedef struct %s { int a; } %s;\n', msgname, msgname) + append('struct %s;\n', msgname) + end + + for msg in filedef:defs(upb.DEF_MSG) do + local msgname = to_cident(msg:full_name()) + append('typedef struct %s %s;\n', msgname, msgname) end -- Forward-declare types not in this file, but used as submessages. -- cgit v1.2.3