Skip to content

Commit ffc6069

Browse files
committed
Fix for Python 3
1 parent c3ca27f commit ffc6069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ py_str_to_git_oid(PyObject *py_str, git_oid *oid)
4242

4343
/* Case 1: raw sha */
4444
if (PyBytes_Check(py_str)) {
45-
err = PyString_AsStringAndSize(py_str, &hex_or_bin, &len);
45+
err = PyBytes_AsStringAndSize(py_str, &hex_or_bin, &len);
4646
if (err)
4747
return -1;
4848
memcpy(oid->id, (const unsigned char*)hex_or_bin, len);

0 commit comments

Comments
 (0)