[postgis-devel] getPoint_internal dangerous?
Björn Harrtell
bjorn.harrtell at gmail.com
Mon Mar 6 12:25:05 PST 2017
I want to mutate one axis of the points in a POINTARRAY in the most
efficient way.
Something similar to ptarray_longitude_shift, see:
https://github.com/postgis/postgis/blob/svn-trunk/liblwgeom/ptarray.c#L1393
I see memcpy being used there and other places and afaik it has something
to do with fears of struct misalignment.
Does this mean I should most definitely not do this? :)
POINT2D *p = (POINT2D *) getPoint_internal(pa, 0);
p->y = extent - p->y;
Regards,
Björn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20170306/c345d9cc/attachment.html>
More information about the postgis-devel
mailing list