summaryrefslogtreecommitdiffstats
path: root/Modules/stdwinmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-01-26 13:33:44 (GMT)
committerGuido van Rossum <guido@python.org>1993-01-26 13:33:44 (GMT)
commit34679b7661873ec65e5157ddd1ea2be8269632d0 (patch)
tree401979fa222c7b621a93bc8c5e4ba928ef0551b7 /Modules/stdwinmodule.c
parent35fb82a33f4bc78be1f7d219b8ebd078b37c90cb (diff)
downloadcpython-34679b7661873ec65e5157ddd1ea2be8269632d0.zip
cpython-34679b7661873ec65e5157ddd1ea2be8269632d0.tar.gz
cpython-34679b7661873ec65e5157ddd1ea2be8269632d0.tar.bz2
* 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
Diffstat (limited to 'Modules/stdwinmodule.c')
-rw-r--r--Modules/stdwinmodule.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c
index 62e9b47..77ba6ec 100644
--- a/Modules/stdwinmodule.c
+++ b/Modules/stdwinmodule.c
@@ -2119,9 +2119,17 @@ stdwin_fetchcolor(self, args)
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 *