@@ -13,6 +13,7 @@ use super::obj::objint;
13
13
use super :: obj:: objiter;
14
14
use super :: obj:: objlist;
15
15
use super :: obj:: objobject;
16
+ use super :: obj:: objproperty;
16
17
use super :: obj:: objset;
17
18
use super :: obj:: objstr;
18
19
use super :: obj:: objtuple;
@@ -89,6 +90,7 @@ pub struct PyContext {
89
90
pub iter_type : PyObjectRef ,
90
91
pub str_type : PyObjectRef ,
91
92
pub function_type : PyObjectRef ,
93
+ pub property_type : PyObjectRef ,
92
94
pub generator_type : PyObjectRef ,
93
95
pub module_type : PyObjectRef ,
94
96
pub bound_method_type : PyObjectRef ,
@@ -145,6 +147,7 @@ impl PyContext {
145
147
let classmethod_type = create_type ( "classmethod" , & type_type, & object_type, & dict_type) ;
146
148
let staticmethod_type = create_type ( "staticmethod" , & type_type, & object_type, & dict_type) ;
147
149
let function_type = create_type ( "function" , & type_type, & object_type, & dict_type) ;
150
+ let property_type = create_type ( "property" , & type_type, & object_type, & dict_type) ;
148
151
let generator_type = create_type ( "generator" , & type_type, & object_type, & dict_type) ;
149
152
let bound_method_type = create_type ( "method" , & type_type, & object_type, & dict_type) ;
150
153
let member_descriptor_type =
@@ -197,6 +200,7 @@ impl PyContext {
197
200
str_type : str_type,
198
201
object : object_type,
199
202
function_type : function_type,
203
+ property_type : property_type,
200
204
generator_type : generator_type,
201
205
module_type : module_type,
202
206
bound_method_type : bound_method_type,
@@ -217,6 +221,7 @@ impl PyContext {
217
221
objcomplex:: init ( & context) ;
218
222
objbytes:: init ( & context) ;
219
223
objbytearray:: init ( & context) ;
224
+ objproperty:: init ( & context) ;
220
225
objstr:: init ( & context) ;
221
226
objtuple:: init ( & context) ;
222
227
objiter:: init ( & context) ;
@@ -277,6 +282,10 @@ impl PyContext {
277
282
self . function_type . clone ( )
278
283
}
279
284
285
+ pub fn property_type ( & self ) -> PyObjectRef {
286
+ self . property_type . clone ( )
287
+ }
288
+
280
289
pub fn classmethod_type ( & self ) -> PyObjectRef {
281
290
self . classmethod_type . clone ( )
282
291
}
0 commit comments