mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[build] Make syscalls.h group by syscall scope
Updating the cog script to make syscalls.h more explicitly grouped by scope.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user