equal
deleted
inserted
replaced
169 } |
169 } |
170 |
170 |
171 newobj = PyBytes_FromStringAndSize(NULL, newlen); |
171 newobj = PyBytes_FromStringAndSize(NULL, newlen); |
172 |
172 |
173 if (newobj) { |
173 if (newobj) { |
174 PyBytes_GET_SIZE(newobj)--; |
174 assert(PyBytes_Check(newobj)); |
|
175 Py_SIZE(newobj)--; |
175 _encodedir(PyBytes_AS_STRING(newobj), newlen, path, |
176 _encodedir(PyBytes_AS_STRING(newobj), newlen, path, |
176 len + 1); |
177 len + 1); |
177 } |
178 } |
178 |
179 |
179 return newobj; |
180 return newobj; |
636 |
637 |
637 if (lastdot >= 0) |
638 if (lastdot >= 0) |
638 memcopy(dest, &destlen, destsize, &src[lastdot], |
639 memcopy(dest, &destlen, destsize, &src[lastdot], |
639 len - lastdot - 1); |
640 len - lastdot - 1); |
640 |
641 |
641 PyBytes_GET_SIZE(ret) = destlen; |
642 PyBytes_Check(ret); |
|
643 Py_SIZE(ret) = destlen; |
642 |
644 |
643 return ret; |
645 return ret; |
644 } |
646 } |
645 |
647 |
646 /* |
648 /* |
748 } |
750 } |
749 |
751 |
750 newobj = PyBytes_FromStringAndSize(NULL, newlen); |
752 newobj = PyBytes_FromStringAndSize(NULL, newlen); |
751 |
753 |
752 if (newobj) { |
754 if (newobj) { |
753 PyBytes_GET_SIZE(newobj)--; |
755 PyBytes_Check(newobj); |
|
756 Py_SIZE(newobj)--; |
754 basicencode(PyBytes_AS_STRING(newobj), newlen, path, |
757 basicencode(PyBytes_AS_STRING(newobj), newlen, path, |
755 len + 1); |
758 len + 1); |
756 } |
759 } |
757 } |
760 } |
758 else |
761 else |