From d593a3688a64905bca7e821dbf238601a384f00e Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 9 Dec 2024 11:13:26 -0500 Subject: [PATCH] fix: fixup for break in EscapeForCString The review suggestion in #271 accidentally changed the type of `result` and broke this part. --- pylib/gyp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylib/gyp/__init__.py b/pylib/gyp/__init__.py index 5b16e0b..8933d0c 100755 --- a/pylib/gyp/__init__.py +++ b/pylib/gyp/__init__.py @@ -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