We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3ca27f commit ffc6069Copy full SHA for ffc6069
src/oid.c
@@ -42,7 +42,7 @@ py_str_to_git_oid(PyObject *py_str, git_oid *oid)
42
43
/* Case 1: raw sha */
44
if (PyBytes_Check(py_str)) {
45
- err = PyString_AsStringAndSize(py_str, &hex_or_bin, &len);
+ err = PyBytes_AsStringAndSize(py_str, &hex_or_bin, &len);
46
if (err)
47
return -1;
48
memcpy(oid->id, (const unsigned char*)hex_or_bin, len);
0 commit comments