Skip to content

Commit

Permalink
Update print file argument
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler authored Dec 4, 2022
1 parent 13df158 commit 7d2d676
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtins/builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ object* builtin_print(object* self, object* args){
object* sep_=dict_get_opti_deref(args, str_new_fromstr("sep"));
object* end=dict_get_opti_deref(args, str_new_fromstr("end"));
object* file=dict_get_opti_deref(args, str_new_fromstr("file"));
if (file==NULL){
FPLDECREF(vm->exception);
vm->exception=NULL;
FPLINCREF(Stdout);
file=Stdout;
}

object* o=object_getattr_deref(file, str_new_fromstr("read"));
if (o==NULL){
Expand Down

0 comments on commit 7d2d676

Please sign in to comment.