libgit2

git_buf_set

Version:

Set buffer to a copy of some raw data.

Signature

int git_buf_set(git_buf *buffer, const void *data, size_t datalen);

Parameters

In
buffer

The buffer to set

const void *
In
data

The data to copy into the buffer

size_t
In
datalen

The length of the data to copy into the buffer

Returns

int

0 on success, -1 on allocation failure

Versions