Skip to content
Snippets Groups Projects
Select Git revision
  • 3.10
  • 3.11
  • main default protected
  • revert-15688-bpo-38031-_io-FileIO-opener-crash
  • 3.8
  • 3.9
  • 3.7
  • enum-fix_auto
  • branch-v3.11.0
  • backport-c3648f4-3.11
  • gh-93963/remove-importlib-resources-abcs
  • refactor-wait_for
  • shared-testcase
  • v3.12.0a2
  • v3.12.0a1
  • v3.11.0
  • v3.8.15
  • v3.9.15
  • v3.10.8
  • v3.7.15
  • v3.11.0rc2
  • v3.8.14
  • v3.9.14
  • v3.7.14
  • v3.10.7
  • v3.11.0rc1
  • v3.10.6
  • v3.11.0b5
  • v3.11.0b4
  • v3.10.5
  • v3.11.0b3
  • v3.11.0b2
  • v3.9.13
33 results

cpython

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Victor Stinner authored
    Convert macros to static inline functions to avoid macro pitfalls,
    like duplication of side effects:
    
    * DK_ENTRIES()
    * DK_UNICODE_ENTRIES()
    * PyCode_GetNumFree()
    * PyFloat_AS_DOUBLE()
    * PyInstanceMethod_GET_FUNCTION()
    * PyMemoryView_GET_BASE()
    * PyMemoryView_GET_BUFFER()
    * PyMethod_GET_FUNCTION()
    * PyMethod_GET_SELF()
    * PySet_GET_SIZE()
    * _PyHeapType_GET_MEMBERS()
    
    Changes:
    
    * PyCode_GetNumFree() casts PyCode_GetNumFree.co_nfreevars from int
      to Py_ssize_t to be future proof, and because Py_ssize_t is
      commonly used in the C API.
    * PyCode_GetNumFree() doesn't cast its argument: the replaced macro
      already required the exact type PyCodeObject*.
    * Add assertions in some functions using "CAST" macros to check
      the arguments type when Python is built with assertions
      (debug build).
    * Remove an outdated comment in unicodeobject.h.
    02f72b8b
    History
    Name Last commit Last update