From ffc6069a34217bf55dc7d8a7fcc29834bc993ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= Date: Sun, 24 Mar 2013 14:04:53 +0100 Subject: [PATCH] Fix for Python 3 --- src/oid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oid.c b/src/oid.c index 86a0ce5..78335d7 100644 --- a/src/oid.c +++ b/src/oid.c @@ -42,7 +42,7 @@ py_str_to_git_oid(PyObject *py_str, git_oid *oid) /* Case 1: raw sha */ if (PyBytes_Check(py_str)) { - err = PyString_AsStringAndSize(py_str, &hex_or_bin, &len); + err = PyBytes_AsStringAndSize(py_str, &hex_or_bin, &len); if (err) return -1; memcpy(oid->id, (const unsigned char*)hex_or_bin, len);