[PATCH 5 of 8] parsers: change the type of nt_level

Bryan O'Sullivan bos at serpentine.com
Tue May 8 17:00:08 CDT 2012


# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1336513730 25200
# Node ID 7b4f3449c14930a0443a2d2cae9660471445cdf8
# Parent  d3c1adb115c078ba46bc0a18af716badac25e27a
parsers: change the type of nt_level

We should generally prefer Py_ssize_t whenever we are talking about
lengths.

diff -r d3c1adb115c0 -r 7b4f3449c149 mercurial/parsers.c
--- a/mercurial/parsers.c	Tue May 08 14:48:48 2012 -0700
+++ b/mercurial/parsers.c	Tue May 08 14:48:50 2012 -0700
@@ -538,7 +538,7 @@
 	return NULL;
 }
 
-static inline int nt_level(const char *node, int level)
+static inline int nt_level(const char *node, Py_ssize_t level)
 {
 	int v = node[level>>1];
 	if (!(level & 1))


More information about the Mercurial-devel mailing list