| 67 | } |
| 68 | |
| 69 | PyObject * |
| 70 | wrap_diff_file(const git_diff_file *file) |
| 71 | { |
| 72 | DiffFile *py_file; |
| 73 | |
| 74 | if (!file) |
| 75 | Py_RETURN_NONE; |
| 76 | |
| 77 | py_file = PyObject_New(DiffFile, &DiffFileType); |
| 78 | if (py_file) { |
| 79 | py_file->id = git_oid_to_python(&file->id); |
| 80 | if (file->path) { |
| 81 | py_file->path = strdup(file->path); |
| 82 | py_file->raw_path = PyBytes_FromString(file->path); |
| 83 | } else { |
| 84 | py_file->path = NULL; |
| 85 | py_file->raw_path = NULL; |
| 86 | } |
| 87 | py_file->size = file->size; |
| 88 | py_file->flags = file->flags; |
| 89 | py_file->mode = file->mode; |
| 90 | } |
| 91 | |
| 92 | return (PyObject *) py_file; |
| 93 | } |
| 94 | |
| 95 | PyObject * |
| 96 | wrap_diff_delta(const git_diff_delta *delta) |
no test coverage detected
searching dependent graphs…