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

Method extend_class

crates/stdlib/src/multiprocessing.rs:322–332  ·  view source on GitHub ↗
(ctx: &Context, class: &Py<PyType>)

Source from the content-addressed store, hash-verified

320
321 #[extend_class]
322 fn extend_class(ctx: &Context, class: &Py<PyType>) {
323 class.set_attr(
324 ctx.intern_str("RECURSIVE_MUTEX"),
325 ctx.new_int(RECURSIVE_MUTEX).into(),
326 );
327 class.set_attr(ctx.intern_str("SEMAPHORE"), ctx.new_int(SEMAPHORE).into());
328 class.set_attr(
329 ctx.intern_str("SEM_VALUE_MAX"),
330 ctx.new_int(i32::MAX).into(),
331 );
332 }
333 }
334
335 impl Constructor for SemLock {

Callers

nothing calls this directly

Calls 4

sysconfFunction · 0.85
intern_strMethod · 0.80
set_attrMethod · 0.45
new_intMethod · 0.45

Tested by

no test coverage detected