[Numpy-svn] [numpy/numpy] 383a44: Use PyMem_RawMalloc on Python 3.4 and newer

GitHub noreply at github.com
Wed Apr 20 20:52:33 EDT 2016


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 383a44e5c8e875b671ce5568b635ed0fd00490ad
      https://github.com/numpy/numpy/commit/383a44e5c8e875b671ce5568b635ed0fd00490ad
  Author: Victor Stinner <vstinner at redhat.com>
  Date:   2016-04-21 (Thu, 21 Apr 2016)

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

  Log Message:
  -----------
  Use PyMem_RawMalloc on Python 3.4 and newer

Change PyArray_malloc() macro to use PyMem_RawMalloc() on Python 3.4
and newer. This macro can be called indirectly from ufunc_at() which
releases the GIL, whereas PyMem_Malloc() requires the GIL to be held:
https://docs.python.org/dev/c-api/memory.html#memory-interface

PyMem_RawMalloc() can be called without the GIL.


  Commit: 631e98941a1d13e1328d3b3944a90fdad31226b4
      https://github.com/numpy/numpy/commit/631e98941a1d13e1328d3b3944a90fdad31226b4
  Author: Nathaniel J. Smith <njs at pobox.com>
  Date:   2016-04-21 (Thu, 21 Apr 2016)

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

  Log Message:
  -----------
  Merge pull request #7404 from haypo/raw_malloc

Use PyMem_RawMalloc on Python 3.4 and newer


Compare: https://github.com/numpy/numpy/compare/35097048522b...631e98941a1d


More information about the Numpy-svn mailing list