Skip to content

Commit

Permalink
wip: remove pub from malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewgapp committed Dec 1, 2024
1 parent aebc114 commit 6b92031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/duckdb/src/vtab/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use std::mem::size_of;
/// used for the bind_info and init_info
/// # Safety
/// This function is obviously unsafe
pub unsafe fn malloc_data_c<T>() -> *mut T {
unsafe fn malloc_data_c<T>() -> *mut T {
duckdb_malloc(size_of::<T>()).cast()
}

Expand All @@ -39,7 +39,7 @@ pub unsafe fn malloc_data_c<T>() -> *mut T {
/// # Safety
/// This function is obviously unsafe
/// TODO: maybe we should use a Free trait here
pub unsafe extern "C" fn drop_data_c<T: Free>(v: *mut c_void) {
unsafe extern "C" fn drop_data_c<T: Free>(v: *mut c_void) {
let actual = v.cast::<T>();
(*actual).free();
duckdb_free(v);
Expand Down

0 comments on commit 6b92031

Please sign in to comment.