Skip to content

Commit a934af2

Browse files
committed
feat: Add git_odb_backend_data_malloc and git_odb_backend_data_free
Added `git_odb_backend_data_malloc` and `git_odb_backend_data_free`. Deprecated `git_odb_backend_malloc` in favour of the above two functions as it has been deprecated for over 6 years.
1 parent 9dfe8db commit a934af2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libgit2-sys/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4115,15 +4115,20 @@ extern "C" {
41154115
priority: c_int,
41164116
) -> c_int;
41174117

4118+
#[deprecated(note = "only kept for compatibility; prefer git_odb_backend_data_alloc")]
41184119
pub fn git_odb_backend_malloc(backend: *mut git_odb_backend, len: size_t) -> *mut c_void;
41194120

4121+
pub fn git_odb_backend_data_alloc(backend: *mut git_odb_backend, len: size_t) -> *mut c_void;
4122+
pub fn git_odb_backend_data_free(backend: *mut git_odb_backend, data: *mut c_void);
4123+
41204124
pub fn git_odb_num_backends(odb: *mut git_odb) -> size_t;
41214125
pub fn git_odb_get_backend(
41224126
backend: *mut *mut git_odb_backend,
41234127
odb: *mut git_odb,
41244128
position: size_t,
41254129
) -> c_int;
41264130

4131+
41274132
// mempack
41284133
pub fn git_mempack_new(out: *mut *mut git_odb_backend) -> c_int;
41294134
pub fn git_mempack_reset(backend: *mut git_odb_backend) -> c_int;

0 commit comments

Comments
 (0)