projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24fca43
)
util/format: Make format_table compatible with C++
author
Danylo Piliaiev
<dpiliaiev@igalia.com>
Wed, 8 Mar 2023 12:35:22 +0000
(13:35 +0100)
committer
Marge Bot
<emma+marge@anholt.net>
Fri, 24 Mar 2023 15:49:25 +0000
(15:49 +0000)
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>
src/util/format/u_format_table.py
patch
|
blob
|
history
diff --git
a/src/util/format/u_format_table.py
b/src/util/format/u_format_table.py
index
9b7c315
..
fdab1a2
100644
(file)
--- a/
src/util/format/u_format_table.py
+++ b/
src/util/format/u_format_table.py
@@
-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):