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

GitHub noreply@github....
Mon Dec 3 18:03:07 CST 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 7855b2605d96a5b9efe1ae48cb8d7554caaba1de
      https://github.com/numpy/numpy/commit/7855b2605d96a5b9efe1ae48cb8d7554caaba1de
  Author: Luis Pedro Coelho <luis@luispedro.org>
  Date:   2012-12-03 (Mon, 03 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: b531ed2c4ae4c51eced5973f56690b9096227b3e
      https://github.com/numpy/numpy/commit/b531ed2c4ae4c51eced5973f56690b9096227b3e
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2012-12-03 (Mon, 03 Dec 2012)

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

  Log Message:
  -----------
  Merge pull request #2780 from luispedro/pyarray-data-voidp

API Make PyArray_DATA return void*


Compare: https://github.com/numpy/numpy/compare/a289be867f81...b531ed2c4ae4


More information about the Numpy-svn mailing list