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

Method getint

crates/stdlib/src/tkinter.rs:326–338  ·  view source on GitHub ↗
(&self, arg: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

324
325 #[pymethod]
326 fn getint(&self, arg: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyObjectRef> {
327 if let Some(int) = arg.downcast_ref::<PyInt>() {
328 return Ok(PyObjectRef::from(vm.ctx.new_int(int.as_bigint().clone())));
329 }
330
331 if let Some(obj) = arg.downcast_ref::<TclObject>() {
332 let value = obj.value;
333 unsafe { tk_sys::Tcl_IncrRefCount(value) };
334 } else {
335 todo!();
336 }
337 todo!();
338 }
339 // TODO: Fix arguments
340 #[pymethod]
341 fn mainloop(&self, threshold: Option<i32>) -> PyResult<()> {

Callers

nothing calls this directly

Calls 3

as_bigintMethod · 0.80
new_intMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected