mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Eliminate ctx.set_attr.
This commit is contained in:
@@ -80,8 +80,7 @@ impl PyCodeRef {
|
||||
}
|
||||
|
||||
pub fn init(context: &PyContext) {
|
||||
let code_type = context.code_type.as_object();
|
||||
extend_class!(context, code_type, {
|
||||
extend_class!(context, &context.code_type, {
|
||||
"__new__" => context.new_rustfunc(PyCodeRef::new),
|
||||
"__repr__" => context.new_rustfunc(PyCodeRef::repr),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user