From bc0544f947aa8b926decbe714bfd955b3d6febe5 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 18 Sep 2014 16:22:38 +0000 Subject: [PATCH] Update comment above getPoint2d_internal, it is safe to cast now git-svn-id: http://svn.osgeo.org/postgis/trunk@12986 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/ptarray.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c index 1e7333bab..af26b4afd 100644 --- a/liblwgeom/ptarray.c +++ b/liblwgeom/ptarray.c @@ -1620,8 +1620,10 @@ ptarray_length(const POINTARRAY *pts) /* * Get a pointer to nth point of a POINTARRAY. - * You cannot safely cast this to a real POINT, due to memory alignment - * constraints. Use getPoint*_p for that. + * + * Casting to returned pointer to POINT2D* should be safe, + * as gserialized format always keeps the POINTARRAY pointer + * aligned to double boundary. */ uint8_t * getPoint_internal(const POINTARRAY *pa, int n) -- 2.50.1