libgit2

git_reference_iterator

Version:

Every backend's iterator must have a pointer to itself as the first element, so the API can talk to it. You'd define your iterator as

struct my_iterator { git_reference_iterator parent; ... }

and assign iter->parent.backend to your git_refdb_backend.

Signature

typedef struct git_reference_iterator { git_refdb *db int (*)(git_reference **, git_reference_iterator *) next int (*)(const char **, git_reference_iterator *) next_name void (*)(git_reference_iterator *) free };

Members

int (*)(git_reference **, git_reference_iterator *)
next

Return the current reference and advance the iterator.

int (*)(const char **, git_reference_iterator *)
next_name

Return the name of the current reference and advance the iterator

void (*)(git_reference_iterator *)
free

Free the iterator

Parameter To

Versions