From c3652b427ee6f94b89d157963a34f2383c280d54 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 2 Dec 2016 08:35:23 +0100 Subject: [PATCH] isl_pw_*_get_space: extract out isl_pw_*_peek_space This function will be reused in the next commit. Signed-off-by: Sven Verdoolaege --- isl_pw_templ.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/isl_pw_templ.c b/isl_pw_templ.c index 916227da..6583cd2c 100644 --- a/isl_pw_templ.c +++ b/isl_pw_templ.c @@ -1499,9 +1499,16 @@ __isl_give isl_val *FN(PW,min)(__isl_take PW *pw) } #endif +/* Return the space of "pw". + */ +__isl_keep isl_space *FN(PW,peek_space)(__isl_keep PW *pw) +{ + return pw ? pw->dim : NULL; +} + __isl_give isl_space *FN(PW,get_space)(__isl_keep PW *pw) { - return pw ? isl_space_copy(pw->dim) : NULL; + return isl_space_copy(FN(PW,peek_space)(pw)); } __isl_give isl_space *FN(PW,get_domain_space)(__isl_keep PW *pw) -- 2.11.4.GIT