pathencode: use assert() for PyBytes_Check()
This should have been added in
a8c948ee3668. I sent the patch to the
list prematurely.
--- a/mercurial/pathencode.c Wed Oct 12 12:22:18 2016 +0200
+++ b/mercurial/pathencode.c Thu Oct 13 21:42:11 2016 +0200
@@ -639,7 +639,7 @@
memcopy(dest, &destlen, destsize, &src[lastdot],
len - lastdot - 1);
- PyBytes_Check(ret);
+ assert(PyBytes_Check(ret));
Py_SIZE(ret) = destlen;
return ret;
@@ -752,7 +752,7 @@
newobj = PyBytes_FromStringAndSize(NULL, newlen);
if (newobj) {
- PyBytes_Check(newobj);
+ assert(PyBytes_Check(newobj));
Py_SIZE(newobj)--;
basicencode(PyBytes_AS_STRING(newobj), newlen, path,
len + 1);