add isl_point_get_ctx
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 23 Jun 2011 12:20:49 +0000 (14:20 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 25 Jun 2011 20:22:20 +0000 (22:22 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/point.h
isl_point.c

index 93d7335..7018d10 100644 (file)
@@ -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(
index 62c4d9f..dc8b88d 100644 (file)
@@ -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);
index 92b0618..f658ccb 100644 (file)
@@ -6,6 +6,11 @@
 #include <isl/seq.h>
 #include <isl_dim_private.h>
 
+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)
 {