]> granicus.if.org Git - postgis/commitdiff
Update comment above getPoint2d_internal, it is safe to cast now
authorSandro Santilli <strk@keybit.net>
Thu, 18 Sep 2014 16:22:38 +0000 (16:22 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 18 Sep 2014 16:22:38 +0000 (16:22 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12986 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/ptarray.c

index 1e7333bab647e7f390228c3b7a7dbfca78355714..af26b4afdbb1838dbead444ba1a5284d0ca7a7d4 100644 (file)
@@ -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)