summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMathieu Bridon <[email protected]>2018-06-07 12:26:20 +0200
committerEric Engestrom <[email protected]>2018-08-01 14:26:19 +0100
commit91939255a7c556a5d85a57fb6a191e0c8cfd29ce (patch)
tree16516add106064ecc4f39cec18bdb080b30faf83 /src/gallium/drivers
parentad363913e6766280f53838126d67370f9e97aa12 (diff)
python: Use the unicode_escape codec
Python 2 had string_escape and unicode_escape codecs. Python 3 only has the latter. These work the same as far as we're concerned, so let's use the future-proof one. However, the reste of the code expects unicode strings, so we need to decode them again. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/egd_tables.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py
index 7489649ec72..8a60a6229ad 100644
--- a/src/gallium/drivers/r600/egd_tables.py
+++ b/src/gallium/drivers/r600/egd_tables.py
@@ -61,7 +61,7 @@ class StringTable:
"""
fragments = [
'"%s\\0" /* %s */' % (
- te[0].encode('string_escape'),
+ te[0].encode('unicode_escape').decode(),
', '.join(str(idx) for idx in te[2])
)
for te in self.table