Skip to content

Commit

Permalink
fix: fixup for break in EscapeForCString (#274)
Browse files Browse the repository at this point in the history
The review suggestion in #271 accidentally changed the type of `result` and broke this part.
  • Loading branch information
addaleax authored Dec 9, 2024
1 parent ef221b1 commit 610f661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylib/gyp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def EscapeForCString(string: bytes | str) -> str:
string = string.encode(encoding='utf8')

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

0 comments on commit 610f661

Please sign in to comment.