changeset 3369:4bad632913d8

python2.5 PyArg_ParseTuple fix Python 2.5 doesn't like it when we mix str objects and the "t#" format in PyArg_ParseTuple. Change it to use "s#". Tested with python 2.3, 2.4 and 2.5.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 12 Oct 2006 14:04:11 -0300
parents 751df21dad72
children b7fe334ff4fb
files mercurial/base85.c mercurial/bdiff.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/base85.c	Thu Oct 12 09:17:16 2006 -0700
+++ b/mercurial/base85.c	Thu Oct 12 14:04:11 2006 -0300
@@ -35,7 +35,7 @@
 	unsigned int acc, val, ch;
         int pad = 0;
 
-	if (!PyArg_ParseTuple(args, "t#|i", &text, &len, &pad))
+	if (!PyArg_ParseTuple(args, "s#|i", &text, &len, &pad))
 		return NULL;
 
         if (pad)
@@ -82,7 +82,7 @@
 	int len, i, j, olen, c, cap;
 	unsigned int acc;
 
-	if (!PyArg_ParseTuple(args, "t#", &text, &len))
+	if (!PyArg_ParseTuple(args, "s#", &text, &len))
 		return NULL;
 
 	olen = len / 5 * 4;
--- a/mercurial/bdiff.c	Thu Oct 12 09:17:16 2006 -0700
+++ b/mercurial/bdiff.c	Thu Oct 12 14:04:11 2006 -0300
@@ -308,7 +308,7 @@
 	char encode[12], *rb;
 	int an, bn, len = 0, la, lb;
 
-	if (!PyArg_ParseTuple(args, "t#t#:bdiff", &sa, &la, &sb, &lb))
+	if (!PyArg_ParseTuple(args, "s#s#:bdiff", &sa, &la, &sb, &lb))
 		return NULL;
 
 	an = splitlines(sa, la, &al);