Patchwork [3,of,3] bdiff: convert more longs to int64_t

login
register
mail settings
Submitter Matt Harbison
Date March 10, 2018, 3:07 a.m.
Message ID <09be2aeb8f5a364fab57.1520651223@Envy>
Download mbox | patch
Permalink /patch/29233/
State Accepted
Headers show

Comments

Matt Harbison - March 10, 2018, 3:07 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1520650747 18000
#      Fri Mar 09 21:59:07 2018 -0500
# Node ID 09be2aeb8f5a364fab574ed3cf00bddbb7b9728a
# Parent  1f313a913f4356f272ef275061d5d169d9c1690e
bdiff: convert more longs to int64_t

MSVC previously flagged these where the function is stored in a pointer:

    bdiff.c(284) : warning C4028: formal parameter 1 different from declaration
    bdiff.c(284) : warning C4028: formal parameter 2 different from declaration
    bdiff.c(284) : warning C4028: formal parameter 3 different from declaration
    bdiff.c(284) : warning C4028: formal parameter 4 different from declaration
Augie Fackler - March 12, 2018, 10:06 p.m.
On Fri, Mar 09, 2018 at 10:07:03PM -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1520650747 18000
> #      Fri Mar 09 21:59:07 2018 -0500
> # Node ID 09be2aeb8f5a364fab574ed3cf00bddbb7b9728a
> # Parent  1f313a913f4356f272ef275061d5d169d9c1690e
> bdiff: convert more longs to int64_t

queued, thanks

Patch

diff --git a/mercurial/cext/bdiff.c b/mercurial/cext/bdiff.c
--- a/mercurial/cext/bdiff.c
+++ b/mercurial/cext/bdiff.c
@@ -257,7 +257,8 @@ 
 	return NULL;
 }
 
-static int hunk_consumer(long a1, long a2, long b1, long b2, void *priv)
+static int hunk_consumer(int64_t a1, int64_t a2, int64_t b1, int64_t b2,
+                         void *priv)
 {
 	PyObject *rl = (PyObject *)priv;
 	PyObject *m = Py_BuildValue("llll", a1, a2, b1, b2);