MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / PyUnicode_KIND

Function PyUnicode_KIND

python3-sys/src/unicodeobject.rs:497–503  ·  view source on GitHub ↗
(o: *mut PyObject)

Source from the content-addressed store, hash-verified

495#[cfg(not(Py_LIMITED_API))]
496#[inline]
497pub unsafe fn PyUnicode_KIND(o: *mut PyObject) -> u32 {
498 debug_assert!(PyUnicode_Check(o) > 0);
499 #[cfg(not(Py_3_12))]
500 debug_assert!(PyUnicode_IS_READY(o));
501 let state = (*(o as *mut PyASCIIObject)).state;
502 (state >> 2) & 7
503}
504
505#[cfg(not(Py_LIMITED_API))]
506pub unsafe fn PyUnicode_DATA(o: *mut PyObject) -> *mut c_void {

Callers 1

data_implMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected