Mercurial > cpython-lru_cache-weakref
diff Modules/stdwinmodule.c @ 1198:2937897a7d8b legacy-trunk
* Added Fixcprt.py: script to fix copyright message.
* various modules: added 1993 to copyright.
* thread.c: added copyright notice.
* ceval.c: minor change to error message for "+"
* stdwinmodule.c: check for error from wfetchcolor
* config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h)
* Add declaration of inittab to import.h
* sysmodule.c: added sys.builtin_module_names
* xxmodule.c, xxobject.c: fix minor errors
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 26 Jan 1993 13:33:44 +0000 |
| parents | 38f0054f44a7 |
| children | 406860dfaac7 |
line wrap: on
line diff
--- a/Modules/stdwinmodule.c Tue Jan 26 13:04:43 1993 +0000 +++ b/Modules/stdwinmodule.c Tue Jan 26 13:33:44 1993 +0000 @@ -2119,9 +2119,17 @@ object *args; { char *colorname; + COLOR color; if (!getstrarg(args, &colorname)) return NULL; - return newintobject((long)wfetchcolor(colorname)); + color = wfetchcolor(colorname); +#ifdef BADCOLOR + if (color == BADCOLOR) { + err_setstr(StdwinError, "color name not found"); + return NULL; + } +#endif + return newintobject((long)color); } static object *
