mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
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:
parent
24fca432ab
commit
d60b551b90
1 changed files with 9 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue