Skip to content

gh-154587: Fix Windows buffer declaration in _cursesmodule#154609

Open
BHUVANSH855 wants to merge 1 commit into
python:mainfrom
BHUVANSH855:fix-154587-curses-buffer
Open

gh-154587: Fix Windows buffer declaration in _cursesmodule#154609
BHUVANSH855 wants to merge 1 commit into
python:mainfrom
BHUVANSH855:fix-154587-curses-buffer

Conversation

@BHUVANSH855

Copy link
Copy Markdown
Contributor

Summary

Fix a Windows-only buffer declaration in Modules/_cursesmodule.c.

The code incorrectly declared:

char *buffer[100];

which creates an array of 100 char * pointers. However, the buffer is passed to PyOS_snprintf(), which expects a writable char * character buffer. This change replaces it with:

char buffer[100];

which matches the intended usage and resolves the clang-cl incompatible pointer type compilation error reported in gh-154587.

Closes gh-154587.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building 'Modules/_cursesmodule.c' for Win32

1 participant