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

Function Blob_getbuffer

src/blob.c:429–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427};
428
429static int
430Blob_getbuffer(Blob *self, Py_buffer *view, int flags)
431{
432 if (Object__load((Object*)self) == NULL) { return -1; } // Lazy load
433 return PyBuffer_FillInfo(view, (PyObject *) self,
434 (void *) git_blob_rawcontent(self->blob),
435 git_blob_rawsize(self->blob), 1, flags);
436}
437
438static PyBufferProcs Blob_as_buffer = {
439 (getbufferproc)Blob_getbuffer,

Callers

nothing calls this directly

Calls 1

Object__loadFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…