@@ -168,10 +168,6 @@ static char *screen_encoding = NULL;
168168 "must call start_color() first"); \
169169 return 0; }
170170
171- #ifndef MIN
172- #define MIN (x ,y ) ((x) < (y) ? (x) : (y))
173- #endif
174-
175171/* Utility Functions */
176172
177173/*
@@ -1212,7 +1208,7 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
12121208 if (!PyArg_ParseTuple (args ,"i;n" , & n ))
12131209 return NULL ;
12141210 Py_BEGIN_ALLOW_THREADS
1215- rtn2 = wgetnstr (self -> win ,rtn ,MIN (n , 1023 ));
1211+ rtn2 = wgetnstr (self -> win , rtn , Py_MIN (n , 1023 ));
12161212 Py_END_ALLOW_THREADS
12171213 break ;
12181214 case 2 :
@@ -1232,11 +1228,11 @@ PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
12321228#ifdef STRICT_SYSV_CURSES
12331229 Py_BEGIN_ALLOW_THREADS
12341230 rtn2 = wmove (self -> win ,y ,x )== ERR ? ERR :
1235- wgetnstr (self -> win , rtn , MIN (n , 1023 ));
1231+ wgetnstr (self -> win , rtn , Py_MIN (n , 1023 ));
12361232 Py_END_ALLOW_THREADS
12371233#else
12381234 Py_BEGIN_ALLOW_THREADS
1239- rtn2 = mvwgetnstr (self -> win , y , x , rtn , MIN (n , 1023 ));
1235+ rtn2 = mvwgetnstr (self -> win , y , x , rtn , Py_MIN (n , 1023 ));
12401236 Py_END_ALLOW_THREADS
12411237#endif
12421238 break ;
@@ -1374,7 +1370,7 @@ PyCursesWindow_InStr(PyCursesWindowObject *self, PyObject *args)
13741370 case 1 :
13751371 if (!PyArg_ParseTuple (args ,"i;n" , & n ))
13761372 return NULL ;
1377- rtn2 = winnstr (self -> win ,rtn ,MIN (n ,1023 ));
1373+ rtn2 = winnstr (self -> win , rtn , Py_MIN (n , 1023 ));
13781374 break ;
13791375 case 2 :
13801376 if (!PyArg_ParseTuple (args ,"ii;y,x" ,& y ,& x ))
@@ -1384,7 +1380,7 @@ PyCursesWindow_InStr(PyCursesWindowObject *self, PyObject *args)
13841380 case 3 :
13851381 if (!PyArg_ParseTuple (args , "iii;y,x,n" , & y , & x , & n ))
13861382 return NULL ;
1387- rtn2 = mvwinnstr (self -> win , y , x , rtn , MIN (n ,1023 ));
1383+ rtn2 = mvwinnstr (self -> win , y , x , rtn , Py_MIN (n ,1023 ));
13881384 break ;
13891385 default :
13901386 PyErr_SetString (PyExc_TypeError , "instr requires 0 or 3 arguments" );
0 commit comments