Patchwork [5,of,5] zope: fix truncation warnings on Windows

login
register
mail settings
Submitter Matt Harbison
Date Aug. 10, 2018, 5:01 a.m.
Message ID <13e8aa10ba08edabccfe.1533877279@Envy>
Download mbox | patch
Permalink /patch/33630/
State Accepted
Headers show

Comments

Matt Harbison - Aug. 10, 2018, 5:01 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1533875730 14400
#      Fri Aug 10 00:35:30 2018 -0400
# Node ID 13e8aa10ba08edabccfef91c0e424730ceb957ad
# Parent  051a9598e4dbec47aa69c9ba10cd0f488828e9c1
zope: fix truncation warnings on Windows
Yuya Nishihara - Aug. 12, 2018, 4:40 a.m.
On Fri, 10 Aug 2018 01:01:19 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1533875730 14400
> #      Fri Aug 10 00:35:30 2018 -0400
> # Node ID 13e8aa10ba08edabccfef91c0e424730ceb957ad
> # Parent  051a9598e4dbec47aa69c9ba10cd0f488828e9c1
> zope: fix truncation warnings on Windows

I think it's probably better to not touch thirdparty code.

Patch

diff --git a/mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c b/mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c
--- a/mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c
+++ b/mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c
@@ -585,7 +585,7 @@  static PyObject *
       return obj;
     }
 
-  l = PyList_GET_SIZE(adapter_hooks);
+  l = (int) PyList_GET_SIZE(adapter_hooks);
   args = PyTuple_New(2);
   if (args == NULL)
     return NULL;
@@ -1354,7 +1354,7 @@  static PyObject *
   int i, l;
   PyObject *generations;
 
-  l = PyTuple_GET_SIZE(ro);
+  l = (int) PyTuple_GET_SIZE(ro);
   generations = PyTuple_New(l);
   for (i=0; i < l; i++)
     {