@@ -392,17 +392,16 @@ _PyCursesStatefulCheckFunction(PyObject *module,
392392 */ 
393393
394394/* 
395-  * Return None if 'code' is OK. Otherwise, set an exception  
396-  * using curses_set_error() and the remaining arguments, and  
397-  * return NULL. 
395+  * Return None if 'code' is different from ERR (implementation-defined).  
396+  * Otherwise, set an exception  using curses_set_error() and the remaining 
397+  * arguments, and  return NULL. 
398398 */ 
399399static  PyObject  * 
400400curses_check_err (PyObject  * module , int  code ,
401401                 const  char  * curses_funcname ,
402402                 const  char  * python_funcname )
403403{
404404    if  (code  !=  ERR ) {
405-         assert (code  ==  OK );
406405        Py_RETURN_NONE ;
407406    }
408407    curses_set_error (module , curses_funcname , python_funcname );
@@ -416,7 +415,6 @@ curses_window_check_err(PyCursesWindowObject *win, int code,
416415                        const  char  * python_funcname )
417416{
418417    if  (code  !=  ERR ) {
419-         assert (code  ==  OK );
420418        Py_RETURN_NONE ;
421419    }
422420    curses_window_set_error (win , curses_funcname , python_funcname );
@@ -1580,7 +1578,7 @@ _curses_window_derwin_impl(PyCursesWindowObject *self, int group_left_1,
15801578    win  =  derwin (self -> win ,nlines ,ncols ,begin_y ,begin_x );
15811579
15821580    if  (win  ==  NULL ) {
1583-         curses_window_set_error (self , "derwin" , NULL );
1581+         curses_window_set_null_error (self , "derwin" , NULL );
15841582        return  NULL ;
15851583    }
15861584
0 commit comments