Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-120593: Fix const qualifier in _PyLong_CompactValue() #121053

Merged
merged 1 commit into from
Jun 26, 2024

Commits on Jun 26, 2024

  1. pythongh-120593: Fix const qualifier in _PyLong_CompactValue()

    Remove the const qualifier of the argument of functions:
    
    * _PyLong_IsCompact()
    * _PyLong_CompactValue()
    
    Py_TYPE() argument is not const.
    
    Fix the compiler warning:
    
      Include/cpython/longintrepr.h: In function ‘_PyLong_CompactValue’:
      Include/pyport.h:19:31: error: cast discards ‘const’ qualifier from
      pointer target type [-Werror=cast-qual]
        (...)
      Include/cpython/longintrepr.h:133:30: note: in expansion of macro
      ‘Py_TYPE’
        assert(PyType_HasFeature(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS));
    vstinner committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a742884 View commit details
    Browse the repository at this point in the history