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")
|
ctx.parse("syscalls.def")
|
||||||
syscalls = ctx.interfaces["syscalls"]
|
syscalls = ctx.interfaces["syscalls"]
|
||||||
|
|
||||||
|
last_scope = None
|
||||||
for id, scope, method in syscalls.methods:
|
for id, scope, method in syscalls.methods:
|
||||||
if scope:
|
if scope:
|
||||||
name = f"{scope.name}_{method.name}"
|
name = f"{scope.name}_{method.name}"
|
||||||
else:
|
else:
|
||||||
name = method.name
|
name = method.name
|
||||||
|
|
||||||
|
if scope != last_scope:
|
||||||
|
cog.outl("")
|
||||||
|
last_scope = scope
|
||||||
|
|
||||||
args = []
|
args = []
|
||||||
if method.constructor:
|
if method.constructor:
|
||||||
args.append("j6_handle_t *handle")
|
args.append("j6_handle_t *handle")
|
||||||
|
|||||||
Reference in New Issue
Block a user