[Numpy-svn] [numpy/numpy] 622795: API Make PyArray_DATA return void*

GitHub noreply@github....
Tue Dec 4 17:44:42 CST 2012


  Branch: refs/heads/maintenance/1.7.x
  Home:   https://github.com/numpy/numpy
  Commit: 6227952f8fe3001c27a41910159752f80e46b4db
      https://github.com/numpy/numpy/commit/6227952f8fe3001c27a41910159752f80e46b4db
  Author: Luis Pedro Coelho <luis@luispedro.org>
  Date:   2012-12-04 (Tue, 04 Dec 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/getset.c

  Log Message:
  -----------
  API Make PyArray_DATA return void*

PyArray_DATA is documented as returning void*. Changing it to return
char* breaks code such as (in C++)::

    float* my_floats = static_cast<float*>(PyArray_DATA(my_array));

PyArray_BYTES returns char*, but is otherwise the same function.


  Commit: a8a877e3269242107c34f1228bb129fc3207a9af
      https://github.com/numpy/numpy/commit/a8a877e3269242107c34f1228bb129fc3207a9af
  Author: Ondřej Čertík <ondrej.certik@gmail.com>
  Date:   2012-12-04 (Tue, 04 Dec 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/getset.c

  Log Message:
  -----------
  Merge pull request #2784 from certik/backport2780

Backport #2780


Compare: https://github.com/numpy/numpy/compare/ad9c2f47b491...a8a877e32692


More information about the Numpy-svn mailing list