[PATCH 2 of 2] parsers: use appropriate format to avoid unnecessary cast operations

André Sintzoff andre.sintzoff at gmail.com
Thu Apr 18 13:33:16 CDT 2013


# HG changeset patch
# User André Sintzoff <andre.sintzoff at gmail.com>
# Date 1366309741 -7200
#      Jeu avr 18 20:29:01 2013 +0200
# Node ID 66bd60964fc93c39177cfbaa7ecc3222249c7527
# Parent  3a57c20af0527025bf5ffefd6f5dbd6e0b4fcd94
parsers: use appropriate format to avoid unnecessary cast operations

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -353,8 +353,8 @@
 
 	pos = p - PyString_AS_STRING(packobj);
 	if (pos != nbytes) {
-		PyErr_Format(PyExc_SystemError, "bad dirstate size: %ld != %ld",
-                             (long)pos, (long)nbytes);
+		PyErr_Format(PyExc_SystemError, "bad dirstate size: %zd != %zd",
+                             pos, nbytes);
 		goto bail;
 	}
 


More information about the Mercurial-devel mailing list