summaryrefslogtreecommitdiff
path: root/python/apt_pkgmodule.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-07-04 20:12:53 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-07-04 20:12:53 +0200
commit7625577a6974aa580877cf5d5ed22a6e663843fb (patch)
tree6e8c517437b4375ae67a1d1b61979953c2abf460 /python/apt_pkgmodule.cc
parentccf689a426760a69b77394abbcddf7897cbd6488 (diff)
downloadpython-apt-7625577a6974aa580877cf5d5ed22a6e663843fb.tar.gz
* tests/test_hashsums.py:
- add tests for the hashsum code
Diffstat (limited to 'python/apt_pkgmodule.cc')
-rw-r--r--python/apt_pkgmodule.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index dea34958..fd7a83cd 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -218,6 +218,7 @@ static PyObject *sha1sum(PyObject *Self,PyObject *Args)
char *s;
Py_ssize_t len;
SHA1Summation Sum;
+ PyString_AsStringAndSize(Obj, &s, &len);
Sum.Add((const unsigned char*)s, len);
return CppPyString(Sum.Result().Value());
}