[Numpy-svn] [numpy/numpy] cf0f98: BUG: Remove pointer cast from the PyArray_BYTES ma...

GitHub noreply@github....
Tue Nov 6 20:07:22 CST 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: cf0f98595cf2e0c69b5432d54bd6ceef57540c67
      https://github.com/numpy/numpy/commit/cf0f98595cf2e0c69b5432d54bd6ceef57540c67
  Author: Frederic <nouiz@nouiz.org>
  Date:   2012-11-06 (Tue, 06 Nov 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h

  Log Message:
  -----------
  BUG: Remove pointer cast from the PyArray_BYTES macro.

This fixes a compilation problem encountered with numpy 1.7 when the
PyArray_BYTES macro was used as an lvalue in Theano. The macro worked as an
lvalue in 1.6 and in 1.7 only the struct name was changed, which makes the
problem a bit of a mystery, but Theano compiles with this fix.


  Commit: e614443709ab49e4a5f2533b038e650f564d3d07
      https://github.com/numpy/numpy/commit/e614443709ab49e4a5f2533b038e650f564d3d07
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2012-11-06 (Tue, 06 Nov 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h

  Log Message:
  -----------
  BUG: Remove pointer cast from the PyArray_DATA macro.

This lets PyArray_DATA be used as an lvalue as some compilers raised an
error with the previous version. The type is now determined by the type of
the struct member and is char*.  PyArray_BYTES had the same problem when
used as an lvalue in Theano and the same fix is used here.  This problem
needs a bigger fix at some point as the function equivalent of the macro
does not return an lvalue.


  Commit: 82c0bb8a964c10b4c37665c5f2f6885fa46cd6a1
      https://github.com/numpy/numpy/commit/82c0bb8a964c10b4c37665c5f2f6885fa46cd6a1
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2012-11-06 (Tue, 06 Nov 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h

  Log Message:
  -----------
  Fixes that let PyArray_DATA and PyArray_BYTES be used as lvalues.

* pull-2709:
  BUG: Remove pointer cast from the PyArray_DATA macro.
  BUG: Remove pointer cast from the PyArray_BYTES macro.


Compare: https://github.com/numpy/numpy/compare/93be7c0ca937...82c0bb8a964c


More information about the Numpy-svn mailing list