summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2018-09-06 21:58:11 -0700
committerJosh Haberman <jhaberman@gmail.com>2018-09-06 21:58:11 -0700
commita4db17592949bbc22d9c3a97e52d228ba3d3ec81 (patch)
treec851fd6c19760317125cd598b1fd8c5b05090fef /tools
parent4a7bc85d7245a19e7e380e7429011b96287974ec (diff)
Removed unnecessary struct definition with "int a".
Diffstat (limited to 'tools')
-rw-r--r--tools/make_c_api.lua7
1 files changed, 6 insertions, 1 deletions
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.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback