From 90fa0ecbc1459e60a9fe78458d9ab7043a156f94 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Sep 2010 12:12:13 +0200 Subject: * apt/debfile.py: - remove bogus comment * python/tag.cc: - allow "bytes" type in TagSecNew (for python3) --- python/tag.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/tag.cc b/python/tag.cc index 97039bc4..44cd06af 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -344,8 +344,12 @@ static PyObject *TagFileJump(PyObject *Self,PyObject *Args) // --------------------------------------------------------------------- static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) { char *Data; + int Len; char *kwlist[] = {"text", 0}; - if (PyArg_ParseTupleAndKeywords(Args,kwds,"s",kwlist,&Data) == 0) + + // this allows reading "byte" types from python3 - but we don't + // make (much) use of it yet + if (PyArg_ParseTupleAndKeywords(Args,kwds,"s#",kwlist,&Data,&Len) == 0) return 0; // Create the object.. -- cgit v1.2.3