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

Function PyUnicode_IS_ASCII

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

Source from the content-addressed store, hash-verified

470#[cfg(not(Py_LIMITED_API))]
471#[inline]
472unsafe fn PyUnicode_IS_ASCII(o: *mut PyObject) -> bool {
473 let ascii_bit = 1 << 6;
474 let state = (*(o as *mut PyASCIIObject)).state;
475 (state & ascii_bit) != 0
476}
477
478#[cfg(not(Py_LIMITED_API))]
479#[inline]

Callers 1

PyUnicode_DATAFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected