From: Sven Verdoolaege Date: Thu, 23 Jun 2011 12:20:49 +0000 (+0200) Subject: add isl_point_get_ctx X-Git-Tag: isl-0.07~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a47dbff78bf5f9e50d7a21af753b6d50f279c55;p=platform%2Fupstream%2Fisl.git add isl_point_get_ctx Signed-off-by: Sven Verdoolaege --- 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) {