changeset 21871:0feb41534421

parsers: remove unused getintat function Warning detected by clang.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 14 Jul 2014 15:42:31 -0700
parents dd716807fd23
children abae1eb695c0
files mercurial/parsers.c
diffstat 1 files changed, 0 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/parsers.c	Mon Jul 14 17:55:31 2014 -0500
+++ b/mercurial/parsers.c	Mon Jul 14 15:42:31 2014 -0700
@@ -342,30 +342,6 @@
 	return ret;
 }
 
-static inline int getintat(PyObject *tuple, int off, uint32_t *v)
-{
-	PyObject *o = PyTuple_GET_ITEM(tuple, off);
-	long val;
-
-	if (PyInt_Check(o))
-		val = PyInt_AS_LONG(o);
-	else if (PyLong_Check(o)) {
-		val = PyLong_AsLong(o);
-		if (val == -1 && PyErr_Occurred())
-			return -1;
-	} else {
-		PyErr_SetString(PyExc_TypeError, "expected an int or long");
-		return -1;
-	}
-	if (LONG_MAX > INT_MAX && (val > INT_MAX || val < INT_MIN)) {
-		PyErr_SetString(PyExc_OverflowError,
-				"Python value to large to convert to uint32_t");
-		return -1;
-	}
-	*v = (uint32_t)val;
-	return 0;
-}
-
 /*
  * Efficiently pack a dirstate object into its on-disk format.
  */