Message173301
Oh oh, it looks like the implementation of tailmatch() was not finished:
/* If both are of the same kind, memcmp is sufficient */
if (kind_self == kind_sub) {
return ...;
}
/* otherwise we have to compare each character by first accesing it */
else {
/* We do not need to compare 0 and len(substring)-1 because
the if statement above ensured already that they are equal
when we end up here. */
/* TODO: honor direction and do a forward or backwards search */
for (i = 1; i < end_sub; ++i) {
if (PyUnicode_READ(kind_self, data_self, offset + i) !=
PyUnicode_READ(kind_sub, data_sub, i))
return 0;
}
return 1;
} |
|
Date |
User |
Action |
Args |
2012-10-19 00:51:23 | vstinner | set | recipients:
+ vstinner, loewis, serhiy.storchaka |
2012-10-19 00:51:23 | vstinner | set | messageid: <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za> |
2012-10-19 00:51:23 | vstinner | link | issue16281 messages |
2012-10-19 00:51:22 | vstinner | create | |
|