Browse Source

bpo-46000: Improve NetBSD curses compatibility (GH-29947)

(cherry picked from commit 2fb797e93c)

Co-authored-by: Thomas Klausner <tk@giga.or.at>
pull/30034/head
Miss Islington (bot) 4 years ago
committed by GitHub
parent
commit
bb76410824
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst
  2. 4
      Modules/_cursesmodule.c

1
Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst

@ -0,0 +1 @@
Improve compatibility of the :mod:`curses` module with NetBSD curses.

4
Modules/_cursesmodule.c

@ -1226,8 +1226,8 @@ PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args)
return NULL;
}
color = (short)((attr >> 8) & 0xff);
attr = attr - (color << 8);
color = (short) PAIR_NUMBER(attr);
attr = attr & A_ATTRIBUTES;
if (use_xy) {
rtn = mvwchgat(self->win,y,x,num,attr,color,NULL);

Loading…
Cancel
Save