From 71fb79492cb955af4bd52e79f1fa69d17e084dbc Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Dec 2017 12:16:24 -0800 Subject: 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 --- src/scheme/ao_scheme_poly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scheme/ao_scheme_poly.c') 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; } -- cgit v1.2.3