@@ -16,6 +16,7 @@ use super::obj::objobject;
16
16
use super :: obj:: objproperty;
17
17
use super :: obj:: objset;
18
18
use super :: obj:: objstr;
19
+ use super :: obj:: objsuper;
19
20
use super :: obj:: objtuple;
20
21
use super :: obj:: objtype;
21
22
use super :: vm:: VirtualMachine ;
@@ -88,6 +89,7 @@ pub struct PyContext {
88
89
pub tuple_type : PyObjectRef ,
89
90
pub set_type : PyObjectRef ,
90
91
pub iter_type : PyObjectRef ,
92
+ pub super_type : PyObjectRef ,
91
93
pub str_type : PyObjectRef ,
92
94
pub function_type : PyObjectRef ,
93
95
pub property_type : PyObjectRef ,
@@ -148,6 +150,7 @@ impl PyContext {
148
150
let staticmethod_type = create_type ( "staticmethod" , & type_type, & object_type, & dict_type) ;
149
151
let function_type = create_type ( "function" , & type_type, & object_type, & dict_type) ;
150
152
let property_type = create_type ( "property" , & type_type, & object_type, & dict_type) ;
153
+ let super_type = create_type ( "property" , & type_type, & object_type, & dict_type) ;
151
154
let generator_type = create_type ( "generator" , & type_type, & object_type, & dict_type) ;
152
155
let bound_method_type = create_type ( "method" , & type_type, & object_type, & dict_type) ;
153
156
let member_descriptor_type =
@@ -200,6 +203,7 @@ impl PyContext {
200
203
str_type : str_type,
201
204
object : object_type,
202
205
function_type : function_type,
206
+ super_type : super_type,
203
207
property_type : property_type,
204
208
generator_type : generator_type,
205
209
module_type : module_type,
@@ -223,6 +227,7 @@ impl PyContext {
223
227
objbytearray:: init ( & context) ;
224
228
objproperty:: init ( & context) ;
225
229
objstr:: init ( & context) ;
230
+ objsuper:: init ( & context) ;
226
231
objtuple:: init ( & context) ;
227
232
objiter:: init ( & context) ;
228
233
objbool:: init ( & context) ;
@@ -278,6 +283,10 @@ impl PyContext {
278
283
self . str_type . clone ( )
279
284
}
280
285
286
+ pub fn super_type ( & self ) -> PyObjectRef {
287
+ self . super_type . clone ( )
288
+ }
289
+
281
290
pub fn function_type ( & self ) -> PyObjectRef {
282
291
self . function_type . clone ( )
283
292
}
0 commit comments