errors.h 348 Bytes
Newer Older
1 2
#ifndef INCLUDE_errors_h__
#define INCLUDE_errors_h__
3

4 5 6
#include "git/errors.h"

/* convenience functions */
7
GIT_INLINE(int) git_int_error(int code)
8 9 10 11 12
{
	git_errno = code;
	return code;
}

13 14 15 16 17
GIT_INLINE(int) git_os_error(void)
{
	return git_int_error(GIT_EOSERR);
}

18
GIT_INLINE(void) *git_ptr_error(int code)
19 20 21 22
{
	git_errno = code;
	return NULL;
}
23

24
#endif