mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-20 08:51:59 +00:00
Merge pull request #3539 from libgit2/typedef-submodule-cb
Use a typedef for the submodule_foreach callback.
This commit is contained in:
commit
21b1e015a3
@ -107,6 +107,17 @@ typedef enum {
|
||||
GIT_SUBMODULE_STATUS_WD_WD_MODIFIED | \
|
||||
GIT_SUBMODULE_STATUS_WD_UNTRACKED)) != 0)
|
||||
|
||||
/**
|
||||
* Function pointer to receive each submodule
|
||||
*
|
||||
* @param sm git_submodule currently being visited
|
||||
* @param name name of the submodule
|
||||
* @param payload value you passed to the foreach function as payload
|
||||
* @return 0 on success or error code
|
||||
*/
|
||||
typedef int (*git_submodule_cb)(
|
||||
git_submodule *sm, const char *name, void *payload);
|
||||
|
||||
/**
|
||||
* Submodule update options structure
|
||||
*
|
||||
@ -239,7 +250,7 @@ GIT_EXTERN(void) git_submodule_free(git_submodule *submodule);
|
||||
*/
|
||||
GIT_EXTERN(int) git_submodule_foreach(
|
||||
git_repository *repo,
|
||||
int (*callback)(git_submodule *sm, const char *name, void *payload),
|
||||
git_submodule_cb callback,
|
||||
void *payload);
|
||||
|
||||
/**
|
||||
|
@ -495,7 +495,7 @@ cleanup:
|
||||
|
||||
int git_submodule_foreach(
|
||||
git_repository *repo,
|
||||
int (*callback)(git_submodule *sm, const char *name, void *payload),
|
||||
git_submodule_cb callback,
|
||||
void *payload)
|
||||
{
|
||||
git_vector snapshot = GIT_VECTOR_INIT;
|
||||
|
Loading…
Reference in New Issue
Block a user