1 /*
2  * Copyright (C) the libgit2 contributors. All rights reserved.
3  *
4  * This file is part of libgit2, distributed under the GNU GPL v2 with
5  * a Linking Exception. For full terms see the included COPYING file.
6  */
7 #ifndef INCLUDE_git_oidarray_h__
8 #define INCLUDE_git_oidarray_h__
9 
10 #include "common.h"
11 #include "oid.h"
12 
13 GIT_BEGIN_DECL
14 
15 /** Array of object ids */
16 typedef struct git_oidarray {
17 	git_oid *ids;
18 	size_t count;
19 } git_oidarray;
20 
21 /**
22  * Free the OID array
23  *
24  * This method must (and must only) be called on `git_oidarray`
25  * objects where the array is allocated by the library. Not doing so,
26  * will result in a memory leak.
27  *
28  * This does not free the `git_oidarray` itself, since the library will
29  * never allocate that object directly itself (it is more commonly embedded
30  * inside another struct or created on the stack).
31  *
32  * @param array git_oidarray from which to free oid data
33  */
34 GIT_EXTERN(void) git_oidarray_free(git_oidarray *array);
35 
36 /** @} */
37 GIT_END_DECL
38 
39 #endif
40 
41