mercurial/dirs.c
changeset 30139 27e00e6352ce
parent 30107 da08f4707282
child 30159 fb5504d7b2c9
equal deleted inserted replaced
30138:733fb9f7bc92 30139:27e00e6352ce
    57 	* The implementation, therefore, is heavily dependent on CPython
    57 	* The implementation, therefore, is heavily dependent on CPython
    58 	* implementation details. We also commit violations of the Python
    58 	* implementation details. We also commit violations of the Python
    59 	* "protocol" such as mutating immutable objects. But since we only
    59 	* "protocol" such as mutating immutable objects. But since we only
    60 	* mutate objects created in this function or in other well-defined
    60 	* mutate objects created in this function or in other well-defined
    61 	* locations, the references are known so these violations should go
    61 	* locations, the references are known so these violations should go
    62 	* unnoticed. */
    62 	* unnoticed. The code for adjusting the length of a PyBytesObject is
       
    63 	* essentially a minimal version of _PyBytes_Resize. */
    63 	while ((pos = _finddir(cpath, pos - 1)) != -1) {
    64 	while ((pos = _finddir(cpath, pos - 1)) != -1) {
    64 		PyObject *val;
    65 		PyObject *val;
    65 
    66 
    66 		/* It's likely that every prefix already has an entry
    67 		/* It's likely that every prefix already has an entry
    67 		   in our dict. Try to avoid allocating and
    68 		   in our dict. Try to avoid allocating and