8000 strarray: remove deprecated declaration · libgit2/libgit2@c7e2dc3 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit c7e2dc3

Browse files
committed
strarray: remove deprecated declaration
`git_strarray_copy` is deprecated (and has been included in `deprecated.h` for some time). It should not have remained in the public `strarray.h`. Remove it.
1 parent cefe6c4 commit c7e2dc3

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

include/git2/strarray.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ typedef struct git_strarray {
3636
*/
3737
GIT_EXTERN(void) git_strarray_dispose(git_strarray *array);
3838

39-
/**
40-
* Copy a string array object from source to target.
41-
*
42-
* Note: target is overwritten and hence should be empty, otherwise its
43-
* contents are leaked. Call git_strarray_free() if necessary.
44-
*
45-
* @param tgt target
46-
* @param src source
47-
* @return 0 on success, < 0 on allocation failure
48-
*/
49-
GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
50-
51-
5239
/** @} */
5340
GIT_END_DECL
5441

src/libgit2/strarray.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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_strarray_h__
8+
#define INCLUDE_strarray_h__
9+
10+
#include "common.h"
11+
12+
/**
13+
* Copy a string array object from source to target.
14+
*
15+
* Note: target is overwritten and hence should be empty, otherwise its
16+
* contents are leaked. Call git_strarray_free() if necessary.
17+
*
18+
* @param tgt target
19+
* @param src source
20+
* @return 0 on success, < 0 on allocation failure
21+
*/
22+
extern int git_strarray_copy(git_strarray *tgt, const git_strarray *src);
23+
24+
#endif

0 commit comments

Comments
 (0)
0