libgit2

giterr_set_oom

Version:

Set the error message to a special value for memory allocation failure.

The normal giterr_set_str() function attempts to strdup() the string that is passed in. This is not a good idea when the error in question is a memory allocation failure. That circumstance has a special setter function that sets the error string to a known and statically allocated internal value.

Signature

void giterr_set_oom();

Versions