From f2c0dfdb138c44ce230d86f9429a373e6e160307 Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Fri, 26 May 2006 10:27:17 +0000 Subject: [PATCH] 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 ;-) --- Objects/stringobject.c | 2 +- Objects/unicodeobject.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0