Skip to content

Avoid Py_ARRAY_LENGTH() - #134

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:array_length
Jan 26, 2025
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:array_length

Conversation

@vstinner

Copy link
Copy Markdown
Member

Replace Py_ARRAY_LENGTH(array) with sizeof(array)/sizeof(array[0]).

Py_ARRAY_LENGTH() fails with C++ on Python 3.9 on macOS.

Replace Py_ARRAY_LENGTH(array) with sizeof(array)/sizeof(array[0]).

Py_ARRAY_LENGTH() fails with C++ on Python 3.9 on macOS.

@corona10 corona10 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vstinner
vstinner merged commit 4c53701 into python:main Jan 26, 2025
@vstinner

Copy link
Copy Markdown
Member Author

Fix related to #131 and python/mypy#18535.

@vstinner
vstinner deleted the array_length branch January 26, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants