Found and fixed a bug I did not previously know about in println.

This commit is contained in:
Simon Brooke 2026-03-18 12:22:12 +00:00
parent 54a99b6796
commit 69b199fecd
4 changed files with 4 additions and 5 deletions

View file

@ -454,7 +454,7 @@ int main( int argc, char *argv[] ) {
&lisp_print );
bind_function( L"println",
L"`(println stream)`: Print a new line character to `stream`, if specified, else to `*out*`.",
&lisp_print );
&lisp_println );
bind_function( L"put!", L"", lisp_hashmap_put );
bind_function( L"put-all!",
L"`(put-all! dest source)`: If `dest` is a namespace and is writable, copies all key-value pairs from `source` into `dest`.",

View file

@ -350,8 +350,6 @@ lisp_println( struct stack_frame *frame, struct cons_pointer frame_pointer,
output = pointer2cell( out_stream ).payload.stream.stream;
println( output );
free( output );
}
return NIL;

View file

@ -97,8 +97,8 @@ struct cons_pointer in_make_empty_frame( struct cons_pointer previous,
frame->depth = depth;
/*
* clearing the frame with memset would probably be slightly quicker, but
* this is clear.
* The frame has already been cleared with memset in make_vso, but our
* NIL is not the same as C's NULL.
*/
frame->more = NIL;
frame->function = NIL;