File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -421,18 +421,18 @@ pub fn mk_module(ctx: &PyContext) -> PyObjectRef {
421
421
} ;
422
422
ctx. set_attr ( & py_mod, "TextIOWrapper" , text_io_wrapper. clone ( ) ) ;
423
423
424
- // BytesIO : in-memory bytes
424
+ //StringIO : in-memory text
425
425
let string_io = {
426
- let string_io = ctx. new_class ( "StringIO" , io_base . clone ( ) ) ;
426
+ let string_io = ctx. new_class ( "StringIO" , text_io_base . clone ( ) ) ;
427
427
ctx. set_attr ( & string_io, "__init__" , ctx. new_rustfunc ( string_io_init) ) ;
428
428
ctx. set_attr ( & string_io, "getvalue" , ctx. new_rustfunc ( string_io_getvalue) ) ;
429
429
string_io
430
430
} ;
431
431
ctx. set_attr ( & py_mod, "StringIO" , string_io) ;
432
432
433
- // StringIO : in-memory text
433
+ //BytesIO : in-memory bytes
434
434
let bytes_io = {
435
- let bytes_io = ctx. new_class ( "BytesIO" , io_base . clone ( ) ) ;
435
+ let bytes_io = ctx. new_class ( "BytesIO" , buffered_io_base . clone ( ) ) ;
436
436
ctx. set_attr ( & bytes_io, "__init__" , ctx. new_rustfunc ( bytes_io_init) ) ;
437
437
ctx. set_attr ( & bytes_io, "getvalue" , ctx. new_rustfunc ( bytes_io_getvalue) ) ;
438
438
bytes_io
You can’t perform that action at this time.
0 commit comments