Skip to content

Commit

Permalink
Use standard %array_class interface
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Mar 14, 2022
1 parent bc665eb commit 3df5a64
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mapscript/swiginc/map.i
Expand Up @@ -557,12 +557,10 @@
int i;
intarray *order;
order = new_intarray(self->numlayers);
for (i=0; i<self->numlayers; i++)
#if (defined(SWIGPYTHON) || defined(SWIGRUBY) ) && SWIG_VERSION >= 0x010328 /* 1.3.28 */
intarray___setitem__(order, i, self->layerorder[i]);
#else
intarray_setitem(order, i, self->layerorder[i]);
#endif
for (i=0; i<self->numlayers; i++) {
# see http://www.swig.org/Doc4.0/SWIGDocumentation.html#Library_carrays for %array_class interface
order.setitem(i, self->layerorder[i]);
}
return order;
}

Expand Down

0 comments on commit 3df5a64

Please sign in to comment.