MCPcopy Create free account
hub / github.com/libgit2/pygit2 / wrap_patch

Function wrap_patch

src/patch.c:43–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43PyObject *
44wrap_patch(git_patch *patch, Blob *oldblob, Blob *newblob)
45{
46 Patch *py_patch;
47
48 assert(patch);
49
50 py_patch = PyObject_New(Patch, &PatchType);
51 if (py_patch) {
52 py_patch->patch = patch;
53
54 Py_XINCREF(oldblob);
55 py_patch->oldblob = oldblob;
56
57 Py_XINCREF(newblob);
58 py_patch->newblob = newblob;
59 }
60
61 return (PyObject*) py_patch;
62}
63
64static void
65Patch_dealloc(Patch *self)

Callers 4

Blob_diffFunction · 0.85
Blob_diff_to_bufferFunction · 0.85
diff_get_patch_byindexFunction · 0.85
Patch_create_fromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…