This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Extended version of _curses over{lay,write} does not work.
Type: Stage:
Components: Extension Modules Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: jsipprell, nnorwitz
Priority: normal Keywords:

Created on 2006-01-09 23:27 by jsipprell, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.3.5-curses.patch jsipprell, 2006-01-09 23:27 Patch for curses window overlay/overwrite copywin arguments
Messages (2)
msg27261 - (view) Author: J. Sipprell (jsipprell) Date: 2006-01-09 23:27
2.3/2.4 library docs indicate the following for the
curses window object methods 'overlay' and 'overwrite':

"To get fine-grained control over the copied region,
the second form of overwrite() can be used. sminrow and
smincol are the upper-left coordinates of the source
window, the other variables mark a rectangle in the
destination window."

[syntax: overlay(destwin[, sminrow, smincol, dminrow,
dmincol, dmaxrow, dmaxcol])]

However, attempting to use the 7 arg form of either
overlay or overwrite results in a TypeError being raised.

Inspection of the PyCursesWindow_Overlay and
PyCursesWindow_Overwrite functions from _cursesmodule.c
reveals an incorrect format for the 7-arg specific call
to PyArg_ParseTuple, such that a single argument tuple
is expected which would contain the method arguments. 
Obviously, this is incompatible with the general
argument length conditional used to decide which
PyArg_ParseTuple will be used.

The bug has only been verified on python 2.3.5, not
2.4, however a cursory examination of 2.4 code reveals
no differences in these functions.

The attached patch alters the PyArg_ParseTuple format
string for both functions such that seven arguments are
parsed as expected and the related copywin() code is
thus executed.
msg27262 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-01-10 07:08
Logged In: YES 
user_id=33168

It was still a problem.  Also UngetMouse(). All are fixed.

Committed revision 41998.
Committed revision 41999. (2.4)
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42781
2006-01-09 23:27:45jsipprellcreate