diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-04-15 17:46:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-15 17:46:36 +0000 |
commit | 9cf8871dd98bf69fe46bba056fa05c3c6bf2222d (patch) | |
tree | 07cc241f8939b08892c013020fba2ed220da0cbf /libc | |
parent | 166efcb4960fe4752b1d8c331643e1fe3c732bb4 (diff) | |
parent | e99df59d1ebb7c9a362343bea8233438da06265c (diff) |
Merge "Make gensyscalls.py compatible with Python 3."
Diffstat (limited to 'libc')
-rwxr-xr-x | libc/tools/gensyscalls.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py index d8d43029f..b4e093ccc 100755 --- a/libc/tools/gensyscalls.py +++ b/libc/tools/gensyscalls.py @@ -434,13 +434,13 @@ def main(arch, syscall_file): for syscall in parser.syscalls: syscall["__NR_name"] = make__NR_name(syscall["name"]) - if syscall.has_key("arm"): + if "arm" in syscall: syscall["asm-arm"] = add_footer(32, arm_eabi_genstub(syscall), syscall) - if syscall.has_key("arm64"): + if "arm64" in syscall: syscall["asm-arm64"] = add_footer(64, arm64_genstub(syscall), syscall) - if syscall.has_key("x86"): + if "x86" in syscall: if syscall["socketcall_id"] >= 0: syscall["asm-x86"] = add_footer(32, x86_genstub_socketcall(syscall), syscall) else: @@ -449,13 +449,13 @@ def main(arch, syscall_file): E("socketcall_id for dispatch syscalls is only supported for x86 in '%s'" % t) return - if syscall.has_key("x86_64"): + if "x86_64" in syscall: syscall["asm-x86_64"] = add_footer(64, x86_64_genstub(syscall), syscall) print("/* Generated by gensyscalls.py. Do not edit. */\n") print("#include <private/bionic_asm.h>\n") for syscall in parser.syscalls: - if syscall.has_key("asm-%s" % arch): + if ("asm-%s" % arch) in syscall: print(syscall["asm-%s" % arch]) if arch == 'arm64': |