summaryrefslogtreecommitdiff
path: root/src/scheme/ao_scheme_poly.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-12-19 12:16:24 -0800
committerKeith Packard <keithp@keithp.com>2017-12-19 12:16:24 -0800
commit71fb79492cb955af4bd52e79f1fa69d17e084dbc (patch)
tree098c8506f476dd61a18bd078fb247a90dabc5a6b /src/scheme/ao_scheme_poly.c
parent34f998d147d08e966daad1ab76c40906018d3d8d (diff)
altos/scheme: Replace memory pool macros with inlines
AO_SCHEME_IS_CONST -> ao_scheme_is_const_addr AO_SCHEME_IS_POOL -> ao_scheme_is_pool_addr Provides better typechecking and avoids confusion with ao_scheme_is_const inline (which takes an ao_poly instead of a void *) Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/scheme/ao_scheme_poly.c')
-rw-r--r--src/scheme/ao_scheme_poly.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scheme/ao_scheme_poly.c b/src/scheme/ao_scheme_poly.c
index 25ac6d67..0cffc196 100644
--- a/src/scheme/ao_scheme_poly.c
+++ b/src/scheme/ao_scheme_poly.c
@@ -65,7 +65,7 @@ ao_scheme_poly(const void *addr, ao_poly type) {
const uint8_t *a = addr;
if (a == NULL)
return AO_SCHEME_NIL;
- if (AO_SCHEME_IS_CONST(a))
+ if (ao_scheme_is_const_addr(a))
return AO_SCHEME_CONST | (a - ao_scheme_const + 4) | type;
return (a - ao_scheme_pool + 4) | type;
}