##// END OF EJS Templates
fsmonitor: handle unicode keys in tuples...
fsmonitor: handle unicode keys in tuples In Python 3, keys in the bset tuple are typically str, not bytes. PyBytes_AsString() would return NULL. But we weren't checking the return value and this would lead to a segfault. This commit makes the code type and Python version aware. The Python version specific code is to allow us to utilize a modern API for converting str -> char* without having to allocate an extra PyObject. FWIW I wanted to assume that keys were always str. However, there appear to be some bytes keys in some cases. I haven't debugged this further. Differential Revision: https://phab.mercurial-scm.org/D7210
Gregory Szorc -
r43712:d359dfc1 stable
Show More
Name Size Modified Last Commit Author
/ hgext / fsmonitor
pywatchman
__init__.py Loading ...
state.py Loading ...
watchmanclient.py Loading ...