chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / os-specific / darwin / apple-source-releases / xnu / python3.patch
blob9f29376187f4cb0aa89fc3c6abe2d9eec2a02086
1 diff --git a/bsd/kern/makekdebugevents.py b/bsd/kern/makekdebugevents.py
2 index 73b2db4..d354ba0 100755
3 --- a/bsd/kern/makekdebugevents.py
4 +++ b/bsd/kern/makekdebugevents.py
5 @@ -5,7 +5,7 @@
6 # named kd_events[] or these mappings.
7 # Required to generate a header file used by DEVELOPMENT and DEBUG kernels.
9 -
11 import sys
12 import re
14 @@ -21,18 +21,18 @@ code_table = []
15 # scan file to generate internal table
16 with open(trace_code_file, 'rt') as codes:
17 for line in codes:
18 - m = id_name_pattern.match(line)
19 - if m:
20 + m = id_name_pattern.match(line)
21 + if m:
22 code_table += [(int(m.group(1),base=16), m.group(2))]
24 # emit typedef:
25 -print "typedef struct {"
26 -print " uint32_t id;"
27 -print " const char *name;"
28 -print "} kd_event_t;"
29 +print("typedef struct {")
30 +print(" uint32_t id;")
31 +print(" const char *name;")
32 +print("} kd_event_t;")
33 # emit structure declaration and sorted initialization:
34 -print "kd_event_t kd_events[] = {"
35 +print("kd_event_t kd_events[] = {")
36 for mapping in sorted(code_table, key=lambda x: x[0]):
37 - print " {0x%x, \"%s\"}," % mapping
38 -print "};"
39 + print(" {0x%x, \"%s\"}," % mapping)
40 +print("};")