MCPcopy Index your code
hub / github.com/RustPython/RustPython / ptr_to_string

Function ptr_to_string

crates/stdlib/src/_sqlite3.rs:3419–3427  ·  view source on GitHub ↗
(
        p: *const u8,
        nbytes: c_int,
        db: *mut sqlite3,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

3417 }
3418
3419 fn ptr_to_string(
3420 p: *const u8,
3421 nbytes: c_int,
3422 db: *mut sqlite3,
3423 vm: &VirtualMachine,
3424 ) -> PyResult<String> {
3425 let s = ptr_to_vec(p, nbytes, db, vm)?;
3426 String::from_utf8(s).map_err(|_| vm.new_value_error("invalid utf-8"))
3427 }
3428
3429 fn ptr_to_vec(
3430 p: *const u8,

Callers 1

collation_callbackMethod · 0.85

Calls 1

ptr_to_vecFunction · 0.85

Tested by

no test coverage detected