Method
tcl_obj_to_bool
(&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, |
Tested by
no test coverage detected