From 1a47dbff78bf5f9e50d7a21af753b6d50f279c55 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 23 Jun 2011 14:20:49 +0200 Subject: [PATCH] add isl_point_get_ctx Signed-off-by: Sven Verdoolaege --- doc/user.pod | 4 ++++ include/isl/point.h | 2 ++ isl_point.c | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 93d7335..7018d10 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -2267,6 +2267,10 @@ using __isl_take isl_point *pnt, enum isl_dim_type type, int pos, unsigned val); +Other properties can be obtained using + + isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); + Points can be copied or freed using __isl_give isl_point *isl_point_copy( diff --git a/include/isl/point.h b/include/isl/point.h index 62c4d9f..dc8b88d 100644 --- a/include/isl/point.h +++ b/include/isl/point.h @@ -11,6 +11,8 @@ extern "C" { struct isl_point; typedef struct isl_point isl_point; +isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); + __isl_give isl_point *isl_point_zero(__isl_take isl_dim *dim); __isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt); void isl_point_free(__isl_take isl_point *pnt); diff --git a/isl_point.c b/isl_point.c index 92b0618..f658ccb 100644 --- a/isl_point.c +++ b/isl_point.c @@ -6,6 +6,11 @@ #include #include +isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt) +{ + return pnt ? isl_dim_get_ctx(pnt->dim) : NULL; +} + __isl_give isl_point *isl_point_alloc(__isl_take isl_dim *dim, __isl_take isl_vec *vec) { -- 2.7.4