From: Fredrik Lundh Date: Fri, 26 May 2006 10:27:17 +0000 (+0000) Subject: needforspeed: use Py_ssize_t for the fastsearch counter and skip X-Git-Tag: v2.5b1~496 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2c0dfdb138c44ce230d86f9429a373e6e160307;p=python needforspeed: use Py_ssize_t for the fastsearch counter and skip length (thanks, neal!). and yes, I've verified that this doesn't slow things down ;-) --- diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 0aa1e5b389..b4c89505f7 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -802,7 +802,7 @@ LOCAL(Py_ssize_t) fastsearch(const char* s, Py_ssize_t n, const char* p, Py_ssize_t m, int mode) { long mask; - int skip, count = 0; + Py_ssize_t skip, count = 0; Py_ssize_t i, j, mlast, w; w = n - m; diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 82914008e0..0dea75d0ad 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3884,7 +3884,7 @@ LOCAL(Py_ssize_t) fastsearch(Py_UNICODE* s, Py_ssize_t n, Py_UNICODE* p, Py_ssize_t m, int mode) { long mask; - int skip, count = 0; + Py_ssize_t skip, count = 0; Py_ssize_t i, j, mlast, w; w = n - m;