[sqlite3_result_pointer](https://www.sqlite.org/bindptr.html)
(context: *mut sqlite3_context, name: &[u8], object: T)
| 363 | |
| 364 | /// [sqlite3_result_pointer](https://www.sqlite.org/bindptr.html) |
| 365 | pub fn result_pointer<T>(context: *mut sqlite3_context, name: &[u8], object: T) { |
| 366 | let b = Box::new(object); |
| 367 | let pointer = Box::into_raw(b).cast::<c_void>(); |
| 368 | unsafe { |
| 369 | sqlite3ext_result_pointer( |
| 370 | context, |
| 371 | pointer, |
| 372 | name.as_ptr().cast::<c_char>().cast_mut(), |
| 373 | Some(pointer_destroy::<T>), |
| 374 | ) |
| 375 | }; |
| 376 | } |
| 377 | |
| 378 | // TODO maybe take in a Box<T>? |
| 379 | /// [`sqlite3_set_auxdata`](https://www.sqlite.org/c3ref/get_auxdata.html) |
nothing calls this directly
no test coverage detected