File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2378,11 +2378,8 @@ A symbol can be coerced to a string.
23782378
23792379 while ((temp = readline (" > " )) != NULL ) {
23802380 input = temp;
2381+ free (temp);
23812382 read_start:
2382- #ifdef READLINE
2383- if (temp && *temp)
2384- add_history (temp);
2385- #endif
23862383
23872384 const char *p = input.c_str ();
23882385 error err;
@@ -2394,8 +2391,12 @@ A symbol can be coerced to a string.
23942391 char *line = readline (" " );
23952392 if (!line) break ;
23962393 input += std::string (" \n " ) + line;
2394+ free (line);
23972395 goto read_start;
23982396 }
2397+ #ifdef READLINE
2398+ add_history (input.c_str ());
2399+ #endif
23992400
24002401 if (!err) {
24012402 while (1 ) {
@@ -2421,7 +2422,6 @@ A symbol can be coerced to a string.
24212422 else {
24222423 print_error (err);
24232424 }
2424- free (temp);
24252425 }
24262426 }
24272427}
Original file line number Diff line number Diff line change 3434#endif
3535
3636namespace arc {
37- constexpr auto VERSION = " 0.25 " ;
37+ constexpr auto VERSION = " 0.26 " ;
3838
3939 enum type {
4040 T_NIL,
You can’t perform that action at this time.
0 commit comments