summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-30 08:10:42 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-30 08:10:42 -0800
commit1702ed8df842ca7c80c293e4e5f353dbf370c0fd (patch)
treed5085bb9a976a975653333a164f84d072170c69a /lib.h
parent80af0b52d0ad27cd9cad279818e9066a1d8139c2 (diff)
downloadtxr-1702ed8df842ca7c80c293e4e5f353dbf370c0fd.tar.gz
txr-1702ed8df842ca7c80c293e4e5f353dbf370c0fd.tar.bz2
txr-1702ed8df842ca7c80c293e4e5f353dbf370c0fd.zip
* eval.c (op_modplace): Bugfix: conflation of new value and
increment value. Separate new value and increment value, and check number of arguments. * lib.h (or2): Turned into inline function due to multiple argument evaluation.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.h b/lib.h
index aa3064f0..732c5eb8 100644
--- a/lib.h
+++ b/lib.h
@@ -506,7 +506,7 @@ INLINE val eq(val a, val b) { return ((a) == (b) ? t : nil); }
#define if3(a, b, c) ((a) ? (b) : (c))
-#define or2(a, b) ((a) ? (a) : (b))
+INLINE val or2(val a, val b) { return a ? a : b; }
#define or3(a, b, c) or2(a, or2(b, c))