Skip to content

Commit

Permalink
no stack_restore in repl
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtg committed Feb 26, 2020
1 parent 3e76182 commit 0a0cc50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
10 changes: 5 additions & 5 deletions arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2369,13 +2369,13 @@ error load_string(const char *text) {
if (err) {
break;
}
//else {
// print_expr(result);
// putchar(' ');
//}
/*else {
print_expr(result);
putchar(' ');
}*/
while (*p && isspace(*p)) p++;
}
//puts("");
/*puts("");*/
return err;
}

Expand Down
6 changes: 1 addition & 5 deletions arc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef _INC_ARC
#define _INC_ARC

#define VERSION "0.20"
#define VERSION "0.20.1"

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
Expand Down Expand Up @@ -104,9 +104,6 @@ char *slurp(const char *path);
error eval_expr(atom expr, atom env, atom *result);
void gc_mark(atom root);
void gc();
void stack_add(atom a);
void stack_restore(int saved_size);
void stack_restore_add(int saved_size, atom a);
error macex(atom expr, atom *result);
char *to_string(atom a, int write);
char *strcat_alloc(char **dst, char *src);
Expand Down Expand Up @@ -139,7 +136,6 @@ atom cons(atom car_val, atom cdr_val);
#define cdr(p) ((p).value.pair->cdr)
#define no(atom) ((atom).type == T_NIL)

extern size_t stack_size;
extern const atom nil;

#endif
2 changes: 0 additions & 2 deletions arcadia.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ void repl() {
char *input;

while ((input = readline("> ")) != NULL) {
int ss = stack_size;
read_start:;
#ifdef READLINE
if (input && *input)
Expand Down Expand Up @@ -51,7 +50,6 @@ void repl() {
} else {
print_error(err);
}
stack_restore(ss);
free(input);
}
}
Expand Down

0 comments on commit 0a0cc50

Please sign in to comment.