Eliminate ctx.set_attr.

This commit is contained in:
Adam Kelly
2019-04-04 14:49:10 +01:00
parent 25c17b4829
commit c8eda3733d
23 changed files with 129 additions and 126 deletions

View File

@@ -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),