History

fix if prim

Sigrid Haflínudóttir committed 6 years ago

Commit 3b7c02e1 parent e4bfb661 file · +2 −1Browse files

Unified · Split

aa.c+2−1
@@ -8,6 +8,7 @@ · 7 unmodified lines
8#define TAG(x) ( (x)->car.c )8#define TAG(x) ( (x)->car.c )
9#define ISNIL(x) ( (x) == &Nil )9#define ISNIL(x) ( (x) == &Nil )
10#define ISTRUE(x) ( (x) == &True )10#define ISTRUE(x) ( (x) == &True )
11#define ISFALSE(x) ( (x) == &False )
11#define TYPE(x) ( TAG(x) & 0x1 ? TAG(x) >> 2 : AA_TPAIR )12#define TYPE(x) ( TAG(x) & 0x1 ? TAG(x) >> 2 : AA_TPAIR )
12#define SETTYPE(x,t) ( TAG(x) = (t) << 2 | 1 )13#define SETTYPE(x,t) ( TAG(x) = (t) << 2 | 1 )
13#define NUMBER(x) ( (x)->cdr.n )14#define NUMBER(x) ( (x)->cdr.n )
@@ -775,7 +776,7 @@ eval(aaContext *ctx, aaObject *obj, aaObject *env, aaObject **newenv) · 761 unmodified lines
775 case P_IF:776 case P_IF:
776 while(!ISNIL(arg)){777 while(!ISNIL(arg)){
777 va = evalarg();778 va = evalarg();
778 if(!ISNIL(va)){779 if(!ISFALSE(va)){
779 res = ISNIL(arg) ? va : evalarg();780 res = ISNIL(arg) ? va : evalarg();
780 break;781 break;
781 }782 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t