util/format: Make format_table compatible with C++
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
This commit is contained in:
committed by
Marge Bot
parent
24fca432ab
commit
d60b551b90
@@ -143,8 +143,17 @@ def write_format_table(formats):
|
||||
|
||||
write_format_table_header(sys.stdout2)
|
||||
|
||||
print('#ifdef __cplusplus', file=sys.stdout2)
|
||||
print('extern "C" {', file=sys.stdout2)
|
||||
print('#endif', file=sys.stdout2)
|
||||
print(file=sys.stdout2)
|
||||
|
||||
u_format_pack.generate(formats)
|
||||
|
||||
print('#ifdef __cplusplus', file=sys.stdout2)
|
||||
print('} /* extern "C" */', file=sys.stdout2)
|
||||
print('#endif', file=sys.stdout2)
|
||||
|
||||
def do_channel_array(channels, swizzles):
|
||||
print(" {")
|
||||
for i in range(4):
|
||||
|
||||
Reference in New Issue
Block a user