diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 0df5859df..277660061 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -2285,17 +2285,6 @@ int dc_array_is_independent (const dc_array_t* array, size_t in int dc_array_search_id (const dc_array_t* array, uint32_t needle, size_t* ret_index); -/** - * Get raw pointer to the data. - * - * @memberof dc_array_t - * @param array The array object. - * @return Raw pointer to the array. You MUST NOT free the data. You MUST NOT access the data beyond the current item count. - * It is not possible to enlarge the array this way. Calling any other dc_array*()-function may discard the returned pointer. - */ -const uint32_t* dc_array_get_raw (const dc_array_t* array); - - /** * @class dc_chatlist_t * diff --git a/deltachat-ffi/src/dc_array.rs b/deltachat-ffi/src/dc_array.rs index 6d14186b0..224c5d06f 100644 --- a/deltachat-ffi/src/dc_array.rs +++ b/deltachat-ffi/src/dc_array.rs @@ -38,14 +38,6 @@ impl dc_array_t { pub(crate) fn search_id(&self, needle: u32) -> Option { (0..self.len()).find(|i| self.get_id(*i) == needle) } - - pub(crate) fn as_ptr(&self) -> *const u32 { - if let dc_array_t::Uint(v) = self { - v.as_ptr() - } else { - panic!("Attempt to convert array of something other than uints to raw"); - } - } } impl From> for dc_array_t { diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index ee04e72a6..096e452f8 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -2049,16 +2049,6 @@ pub unsafe extern "C" fn dc_array_search_id( } } -#[no_mangle] -pub unsafe extern "C" fn dc_array_get_raw(array: *const dc_array_t) -> *const u32 { - if array.is_null() { - eprintln!("ignoring careless call to dc_array_get_raw()"); - return ptr::null_mut(); - } - - (*array).as_ptr() -} - // Return the independent-state of the location at the given index. // Independent locations do not belong to the track of the user. // Returns 1 if location belongs to the track of the user,