diff mercurial/base85.c @ 3330:a5209a1e53d8

Support buffer interface in base85 codec
author Brendan Cully <brendan@kublai.com>
date Wed, 11 Oct 2006 09:27:57 -0700
parents e93c926e069e
children 4bad632913d8
line wrap: on
line diff
--- a/mercurial/base85.c
+++ b/mercurial/base85.c
@@ -35,7 +35,7 @@ b85encode(PyObject *self, PyObject *args
 	unsigned int acc, val, ch;
         int pad = 0;
 
-	if (!PyArg_ParseTuple(args, "s#|i", &text, &len, &pad))
+	if (!PyArg_ParseTuple(args, "t#|i", &text, &len, &pad))
 		return NULL;
 
         if (pad)
@@ -82,7 +82,7 @@ b85decode(PyObject *self, PyObject *args
 	int len, i, j, olen, c, cap;
 	unsigned int acc;
 
-	if (!PyArg_ParseTuple(args, "s#", &text, &len))
+	if (!PyArg_ParseTuple(args, "t#", &text, &len))
 		return NULL;
 
 	olen = len / 5 * 4;