This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients loewis, serhiy.storchaka, vstinner
Date 2012-10-19.00:51:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za>
In-reply-to
Content
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;
        }
History
Date User Action Args
2012-10-19 00:51:23vstinnersetrecipients: + vstinner, loewis, serhiy.storchaka
2012-10-19 00:51:23vstinnersetmessageid: <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za>
2012-10-19 00:51:23vstinnerlinkissue16281 messages
2012-10-19 00:51:22vstinnercreate