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

Method tcl_obj_to_bool

crates/stdlib/src/tkinter.rs:180–191  ·  view source on GitHub ↗
(&self, obj: *mut tk_sys::Tcl_Obj)

Source from the content-addressed store, hash-verified

178 #[pyclass(with(Constructor))]
179 impl TkApp {
180 fn tcl_obj_to_bool(&self, obj: *mut tk_sys::Tcl_Obj) -> bool {
181 let mut res = -1;
182 unsafe {
183 if tk_sys::Tcl_GetBooleanFromObj(self.interpreter, obj, &mut res)
184 != tk_sys::TCL_OK as i32
185 {
186 panic!("Tcl_GetBooleanFromObj failed");
187 }
188 }
189 assert!(res == 0 || res == 1);
190 res != 0
191 }
192
193 fn tcl_obj_to_pyobject(
194 &self,

Callers 1

tcl_obj_to_pyobjectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected