Skip to content

Fix issue #20821#20823

Open
lshariprasad wants to merge 2 commits intopython:masterfrom
lshariprasad:fix-20821
Open

Fix issue #20821#20823
lshariprasad wants to merge 2 commits intopython:masterfrom
lshariprasad:fix-20821

Conversation

@lshariprasad
Copy link

TODO: Fix C string encoding in mypyc/codegen/cstring.py

Issue

The current implementation uses octal escape sequences (\XXX) but the tests expect hex escape sequences (\xXX).

This are the main changes maded :

  1. Understand the expected behavior from tests in test_emitfunc.py
  2. Update CHAR_MAP to use hex escapes instead of octal escapes
  3. Keep simple escape sequences for special chars (\n, \r, \t, etc.)
  4. Update the docstring to reflect correct format (\xXX instead of \oXXX)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant