コード例 #1
0
ファイル: ggit-tree.c プロジェクト: hsoft/libgit2-glib
static int
walk_callback_wrapper (const char           *root,
                       const git_tree_entry *entry,
                       gpointer              payload)
{
	gint ret;
	GgitTreeEntry *wentry;
	WalkInfo *info = (WalkInfo *)payload;

	wentry = _ggit_tree_entry_wrap (git_tree_entry_dup(entry), TRUE);

	ret = info->callback(root, wentry, info->user_data);

	ggit_tree_entry_unref (wentry);

	return ret;
}
コード例 #2
0
static int
walk_callback_wrapper (const char           *root,
                       const git_tree_entry *entry,
                       gpointer              payload)
{
	gint ret;
	GgitTreeEntry *wentry;
	WalkInfo *info = (WalkInfo *)payload;
	git_tree_entry *dest;

	ret = git_tree_entry_dup (&dest, entry);
	if (ret == GIT_OK)
	{
		wentry = _ggit_tree_entry_wrap (dest, TRUE);

		ret = info->callback(root, wentry, info->user_data);

		ggit_tree_entry_unref (wentry);
	}

	return ret;
}