Skip to content

Commit 610f661

Browse files
authored
fix: fixup for break in EscapeForCString (#274)
The review suggestion in #271 accidentally changed the type of `result` and broke this part.
1 parent ef221b1 commit 610f661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylib/gyp/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def EscapeForCString(string: bytes | str) -> str:
2929
string = string.encode(encoding='utf8')
3030

3131
backslash_or_double_quote = {ord('\\'), ord('"')}
32-
result = []
32+
result = ''
3333
for char in string:
3434
if char in backslash_or_double_quote or not 32 <= char < 127:
3535
result += '\\%03o' % char

0 commit comments

Comments
 (0)