Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler authored Dec 4, 2022
1 parent e07e20d commit c67cc4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions object/builtinobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ void setup_builtins(){
object* printkwargs=new_tuple();
tuple_append_noinc(printkwargs, str_new_fromstr("\n"));
tuple_append_noinc(printkwargs, str_new_fromstr(" "));
tuple_append(printkwargs, Stdout);
builtins[0]=new_builtin((builtinfunc)builtin_print, str_new_fromstr("print"), printargs, printkwargs, 3, true);

object* buildclassargs=new_tuple();
Expand Down
2 changes: 2 additions & 0 deletions object/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ TypeObject OverflowError;
TypeObject NotImplementedError;

object* Stdout;
object* orig_Stdout;
object* Stdin;

bool setup_memory_error=false;
Expand Down Expand Up @@ -674,6 +675,7 @@ void setup_types_consts(){
setup_cwrapperfile_type();

Stdout=cwrapperfile_new_fromfile(stdout, false, true);
orig_Stdout=Stdout;
Stdin=cwrapperfile_new_fromfile(stdin, true, false);

setup_builtins();
Expand Down

0 comments on commit c67cc4a

Please sign in to comment.