@@ -6,9 +6,9 @@ use crate::{
66 getset:: { IntoPyGetterFunc , IntoPySetterFunc , PyGetSet } ,
77 object, pystr,
88 type_:: PyAttributes ,
9- PyBaseException , PyComplex , PyDict , PyDictRef , PyEllipsis , PyFloat , PyFrozenSet , PyInt ,
10- PyIntRef , PyList , PyListRef , PyNone , PyNotImplemented , PyStr , PyStrInterned , PyTuple ,
11- PyTupleRef , PyType , PyTypeRef ,
9+ PyBaseException , PyBytes , PyComplex , PyDict , PyDictRef , PyEllipsis , PyFloat , PyFrozenSet ,
10+ PyInt , PyIntRef , PyList , PyListRef , PyNone , PyNotImplemented , PyStr , PyStrInterned ,
11+ PyTuple , PyTupleRef , PyType , PyTypeRef ,
1212 } ,
1313 class:: { PyClassImpl , StaticType } ,
1414 common:: rc:: PyRc ,
@@ -30,6 +30,7 @@ pub struct Context {
3030 pub empty_tuple : PyTupleRef ,
3131 pub empty_frozenset : PyRef < PyFrozenSet > ,
3232 pub empty_str : PyRef < PyStr > ,
33+ pub empty_bytes : PyRef < PyBytes > ,
3334 pub ellipsis : PyRef < PyEllipsis > ,
3435 pub not_implemented : PyRef < PyNotImplemented > ,
3536
@@ -273,14 +274,15 @@ impl Context {
273274 . into ( ) ;
274275
275276 let empty_str = unsafe { string_pool. intern ( "" , types. str_type . to_owned ( ) ) } . to_owned ( ) ;
276-
277+ let empty_bytes = create_object ( PyBytes :: from ( Vec :: new ( ) ) , types . bytes_type ) ;
277278 let context = Context {
278279 true_value,
279280 false_value,
280281 none,
281282 empty_tuple,
282283 empty_frozenset,
283284 empty_str,
285+ empty_bytes,
284286
285287 ellipsis,
286288 not_implemented,
0 commit comments