From: Serhiy Storchaka Date: Thu, 5 Sep 2013 15:02:31 +0000 (+0300) Subject: Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in X-Git-Tag: v3.4.0a2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a83a022f9a5912a9ee944c4c04a0708ed21216cc;p=thirdparty%2FPython%2Fcpython.git Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in the _sre moduel. --- a83a022f9a5912a9ee944c4c04a0708ed21216cc diff --cc Modules/_sre.c index e10bb9565bfa,5bcc387977ae..99c3cd5c05f9 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@@ -795,9 -804,11 +800,11 @@@ entrance if (ctx->pattern[0] == SRE_OP_INFO) { /* optimization info block */ /* <1=skip> <2=flags> <3=min> ... */ - if (ctx->pattern[3] && (end - ctx->ptr)/state->charsize < ctx->pattern[3]) { + if (ctx->pattern[3] && (Py_uintptr_t)(end - ctx->ptr)/state->charsize < ctx->pattern[3]) { - TRACE(("reject (got %d chars, need %d)\n", - (end - ctx->ptr)/state->charsize, ctx->pattern[3])); + TRACE(("reject (got %" PY_FORMAT_SIZE_T "d chars, " + "need %" PY_FORMAT_SIZE_T "d)\n", + (end - ctx->ptr)/state->charsize, + (Py_ssize_t) ctx->pattern[3])); RETURN_FAILURE; } ctx->pattern += ctx->pattern[1] + 1;