[GRASS-SVN] r71267 - grass/trunk/lib/vector/dglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 17 09:49:47 PDT 2017
Author: mmetz
Date: 2017-07-17 09:49:47 -0700 (Mon, 17 Jul 2017)
New Revision: 71267
Modified:
grass/trunk/lib/vector/dglib/graph_v1.h
grass/trunk/lib/vector/dglib/graph_v2.h
Log:
dglib: fix for sizeof(long) != sizeof(long *)
Modified: grass/trunk/lib/vector/dglib/graph_v1.h
===================================================================
--- grass/trunk/lib/vector/dglib/graph_v1.h 2017-07-17 16:31:24 UTC (rev 71266)
+++ grass/trunk/lib/vector/dglib/graph_v1.h 2017-07-17 16:49:47 UTC (rev 71267)
@@ -103,13 +103,13 @@
* Node Buffer Utilities
*/
#define DGL_NODEBUFFER_SHIFT_v1(pgrp,o) ((dglInt32_t*)((pgrp)->pNodeBuffer + (o)))
-#define DGL_NODEBUFFER_OFFSET_v1(pgrp,p) ((dglInt32_t)p - (dglInt32_t)(pgrp)->pNodeBuffer)
+#define DGL_NODEBUFFER_OFFSET_v1(pgrp,p) ((dglInt32_t)(p - (dglInt32_t *)(pgrp)->pNodeBuffer))
/*
* Edge Buffer Utilities
*/
#define DGL_EDGEBUFFER_SHIFT_v1(pgrp,o) ((dglInt32_t*)((pgrp)->pEdgeBuffer + (o)))
-#define DGL_EDGEBUFFER_OFFSET_v1(pgrp,pl) ((dglInt32_t)pl - (dglInt32_t)(pgrp)->pEdgeBuffer)
+#define DGL_EDGEBUFFER_OFFSET_v1(pgrp,pl) ((dglInt32_t)(pl - (dglInt32_t *)(pgrp)->pEdgeBuffer))
Modified: grass/trunk/lib/vector/dglib/graph_v2.h
===================================================================
--- grass/trunk/lib/vector/dglib/graph_v2.h 2017-07-17 16:31:24 UTC (rev 71266)
+++ grass/trunk/lib/vector/dglib/graph_v2.h 2017-07-17 16:49:47 UTC (rev 71267)
@@ -106,13 +106,13 @@
* Node Buffer Utilities
*/
#define DGL_NODEBUFFER_SHIFT_v2(pgrp,o) ((dglInt32_t*)((pgrp)->pNodeBuffer + (o)))
-#define DGL_NODEBUFFER_OFFSET_v2(pgrp,p) ((dglInt32_t)p - (dglInt32_t)(pgrp)->pNodeBuffer)
+#define DGL_NODEBUFFER_OFFSET_v2(pgrp,p) ((dglInt32_t)(p - (dglInt32_t *)(pgrp)->pNodeBuffer))
/*
* Edge Buffer Utilities
*/
#define DGL_EDGEBUFFER_SHIFT_v2(pgrp,o) ((dglInt32_t*)((pgrp)->pEdgeBuffer + (o)))
-#define DGL_EDGEBUFFER_OFFSET_v2(pgrp,pl) ((dglInt32_t)pl - (dglInt32_t)(pgrp)->pEdgeBuffer)
+#define DGL_EDGEBUFFER_OFFSET_v2(pgrp,pl) ((dglInt32_t)(pl - (dglInt32_t *)(pgrp)->pEdgeBuffer))
More information about the grass-commit
mailing list