fixed int<->long conversions
fixed int<->long conversions

on 64 bit machines, std::ptrdiff_t uses long as data type, but int is used on 32 bit machines.

In PyArrayObject, the number of dimensions is encoded as int, so using long here causes many conversions of long<->int which give compiler errors in some circumstances.

E.g. using -std=c++0x, g++ fails to build with the following output:

In file included from /home/jmg/Dokumente/vigra-hg/vigranumpy/src/core/vigranumpycore.cxx:40:
/home/jmg/Dokumente/vigra-hg/include/vigra/numpy_array.hxx: In member function ‘vigra::NumpyAnyArray vigra::NumpyAnyArray::permuteChannelsToFront() const’:
/home/jmg/Dokumente/vigra-hg/include/vigra/numpy_array.hxx:1099: error: narrowing conversion of ‘M’ from ‘vigra::MultiArrayIndex’ to ‘int’ inside { }

Using int here makes the behaviour consistent on 32bit and 64bit machines and avoids long<->int conversions.

kod3r/vigra,funkey/vigra,ThomasWalter/vigra,dagophil/vigra,mmuellner/vigra,mmuellner/vigra,dstoe/vigra,timoMa/vigra,kod3r/vigra,cha007/vigra,capturePointer/vigra,ThomasWalter/vigra,xiwei-zhang/vigra,timoMa/vigra,mmuellner/vigra,capturePointer/vigra,timoMa/vigra,martinsch/vigra,cbecker/vigra,dagophil/vigra,stuarteberg/vigra,ThomasWalter/vigra,mmuellner/vigra,DaveRichmond-/vigra,ThomasWalter/vigra,dagophil/vigra,capturePointer/vigra,cbecker/vigra,mmuellner/vigra,psteinb/vigra,mmuellner/vigra,stuarteberg/vigra,DaveRichmond-/vigra,xiwei-zhang/vigra,stuarteberg/vigra,funkey/vigra,funkey/vigra,DaveRichmond-/vigra,DaveRichmond-/vigra,hmeine/vigra,stuarteberg/vigra,stuarteberg/vigra,xiwei-zhang/vigra,cha007/vigra,hmeine/vigra,hmeine/vigra,martinsch/vigra,kod3r/vigra,martinsch/vigra,timoMa/vigra,DaveRichmond-/vigra,kod3r/vigra,cha007/vigra,cha007/vigra,dstoe/vigra,ThomasWalter/vigra,dagophil/vigra,hmeine/vigra,cha007/vigra,dstoe/vigra,xiwei-zhang/vigra,timoMa/vigra,xiwei-zhang/vigra,martinsch/vigra,funkey/vigra,DaveRichmond-/vigra,cha007/vigra,ThomasWalter/vigra,funkey/vigra,capturePointer/vigra,martinsch/vigra,stuarteberg/vigra,psteinb/vigra,cbecker/vigra,dagophil/vigra,psteinb/vigra,timoMa/vigra,kod3r/vigra,dstoe/vigra,psteinb/vigra,cbecker/vigra,psteinb/vigra,capturePointer/vigra,dstoe/vigra,ThomasWalter/vigra,kod3r/vigra,funkey/vigra,funkey/vigra,dstoe/vigra,hmeine/vigra,cbecker/vigra,timoMa/vigra,xiwei-zhang/vigra,psteinb/vigra,martinsch/vigra,hmeine/vigra,cha007/vigra,dagophil/vigra,psteinb/vigra,hmeine/vigra,dagophil/vigra,DaveRichmond-/vigra,dstoe/vigra,stuarteberg/vigra,kod3r/vigra,cbecker/vigra,capturePointer/vigra,xiwei-zhang/vigra,capturePointer/vigra,mmuellner/vigra