| 130 | } |
| 131 | |
| 132 | static int |
| 133 | pgit_odb_backend_read_header(size_t *len, git_object_t *type, |
| 134 | git_odb_backend *_be, const git_oid *oid) |
| 135 | { |
| 136 | pgit_odb_backend *be = (pgit_odb_backend *)_be; |
| 137 | |
| 138 | PyObject *py_oid = git_oid_to_python(oid); |
| 139 | if (py_oid == NULL) |
| 140 | return GIT_EUSER; |
| 141 | |
| 142 | PyObject *result = PyObject_CallMethod(be->py_backend, "read_header_cb", "N", py_oid); |
| 143 | if (result == NULL) |
| 144 | return git_error_for_exc(); |
| 145 | |
| 146 | Py_ssize_t type_value; |
| 147 | if (!PyArg_ParseTuple(result, "nn", &type_value, len)) { |
| 148 | Py_DECREF(result); |
| 149 | return GIT_EUSER; |
| 150 | } |
| 151 | *type = (git_object_t)type_value; |
| 152 | |
| 153 | Py_DECREF(result); |
| 154 | return 0; |
| 155 | } |
| 156 | |
| 157 | static int |
| 158 | pgit_odb_backend_write(git_odb_backend *_be, const git_oid *oid, |
nothing calls this directly
no test coverage detected
searching dependent graphs…