From fd93023440869fd611a115b5ec83b608644a2fbe Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Thu, 23 Dec 2021 17:01:06 -0800 Subject: [PATCH] [build] Make syscalls.h group by syscall scope Updating the cog script to make syscalls.h more explicitly grouped by scope. --- src/libraries/j6/include/j6/syscalls.h.cog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libraries/j6/include/j6/syscalls.h.cog b/src/libraries/j6/include/j6/syscalls.h.cog index 78042a2..88c68dc 100644 --- a/src/libraries/j6/include/j6/syscalls.h.cog +++ b/src/libraries/j6/include/j6/syscalls.h.cog @@ -14,12 +14,17 @@ ctx = Context(definitions_path) ctx.parse("syscalls.def") syscalls = ctx.interfaces["syscalls"] +last_scope = None for id, scope, method in syscalls.methods: if scope: name = f"{scope.name}_{method.name}" else: name = method.name + if scope != last_scope: + cog.outl("") + last_scope = scope + args = [] if method.constructor: args.append("j6_handle_t *handle")