]> granicus.if.org Git - python/commitdiff
needforspeed: use Py_ssize_t for the fastsearch counter and skip
authorFredrik Lundh <fredrik@pythonware.com>
Fri, 26 May 2006 10:27:17 +0000 (10:27 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Fri, 26 May 2006 10:27:17 +0000 (10:27 +0000)
length (thanks, neal!).  and yes, I've verified that this doesn't
slow things down ;-)

Objects/stringobject.c
Objects/unicodeobject.c

index 0aa1e5b38903a6ec3ceddf688a57004066675e52..b4c89505f7d7fbf780bb28409a3f36c2acf3d0d7 100644 (file)
@@ -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;
index 82914008e0ac752bd49df78112f1cea4cc019689..0dea75d0ad62c0d2f36e94cc5fd327645521f848 100644 (file)
@@ -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;