mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 13:12:22 +00:00
Update callback fn ptr for git_reference_foreach
As part of API review, use a typedef for the callback fn ptr.
This commit is contained in:
parent
e120123e36
commit
eecc805029
@ -288,6 +288,8 @@ GIT_EXTERN(int) git_reference_packall(git_repository *repo);
|
|||||||
*/
|
*/
|
||||||
GIT_EXTERN(int) git_reference_list(git_strarray *array, git_repository *repo, unsigned int list_flags);
|
GIT_EXTERN(int) git_reference_list(git_strarray *array, git_repository *repo, unsigned int list_flags);
|
||||||
|
|
||||||
|
typedef int (*git_reference_foreach_cb)(const char *refname, void *payload);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a callback on each reference in the repository.
|
* Perform a callback on each reference in the repository.
|
||||||
*
|
*
|
||||||
@ -308,7 +310,11 @@ GIT_EXTERN(int) git_reference_list(git_strarray *array, git_repository *repo, un
|
|||||||
* @param payload Additional data to pass to the callback
|
* @param payload Additional data to pass to the callback
|
||||||
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
|
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
|
||||||
*/
|
*/
|
||||||
GIT_EXTERN(int) git_reference_foreach(git_repository *repo, unsigned int list_flags, int (*callback)(const char *, void *), void *payload);
|
GIT_EXTERN(int) git_reference_foreach(
|
||||||
|
git_repository *repo,
|
||||||
|
unsigned int list_flags,
|
||||||
|
git_reference_foreach_cb callback,
|
||||||
|
void *payload);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a reference has been loaded from a packfile.
|
* Check if a reference has been loaded from a packfile.
|
||||||
|
@ -1478,7 +1478,7 @@ int git_reference_packall(git_repository *repo)
|
|||||||
int git_reference_foreach(
|
int git_reference_foreach(
|
||||||
git_repository *repo,
|
git_repository *repo,
|
||||||
unsigned int list_flags,
|
unsigned int list_flags,
|
||||||
int (*callback)(const char *, void *),
|
git_reference_foreach_cb callback,
|
||||||
void *payload)
|
void *payload)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
Loading…
Reference in New Issue
Block a user