Beispiel #1
0
static int parse_int(int *out, git_patch_parse_ctx *ctx)
{
	git_off_t num;

	if (git_parse_advance_digit(&num, &ctx->parse_ctx, 10) < 0 || !git__is_int(num))
		return -1;

	*out = (int)num;
	return 0;
}
Beispiel #2
0
static int parse_int(int *out, git_patch_parse_ctx *ctx)
{
	git_off_t num;

	if (parse_number(&num, ctx) < 0 || !git__is_int(num))
		return -1;

	*out = (int)num;
	return 0;
}