diff options
author | Guido van Rossum <guido@python.org> | 1996-04-09 02:37:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-04-09 02:37:57 (GMT) |
commit | c606fe186f4b2e1d962651ae3ea34325c65b83dc (patch) | |
tree | fbae3813bfa169efdc9fd606df48c8f4797e3340 /Python | |
parent | 4f1c59b818575a2b9400a7479f7adc8e0521d1f7 (diff) | |
download | cpython-c606fe186f4b2e1d962651ae3ea34325c65b83dc.zip cpython-c606fe186f4b2e1d962651ae3ea34325c65b83dc.tar.gz cpython-c606fe186f4b2e1d962651ae3ea34325c65b83dc.tar.bz2 |
Under NT, define sys.dllhandle and sys.winver (Mark H.).
Diffstat (limited to 'Python')
-rw-r--r-- | Python/sysmodule.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index d59a04f..10dd061 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -49,6 +49,10 @@ int sys_checkinterval = 10; static object *sysdict; +#ifdef NT +extern void *PyWin_DLLhModule; +#endif + object * sysget(name) char *name; @@ -256,6 +260,12 @@ initsys() dictinsert(sysdict, "builtin_module_names", v = list_builtin_module_names()); XDECREF(v); +#ifdef NT + dictinsert(sysdict, "dllhandle", v = newintobject((int)PyWin_DLLhModule)); + XDECREF(v); + dictinsert(sysdict, "winver", v = newstringobject(WIN32_PATCH_LEVEL)); + XDECREF(v); +#endif if (err_occurred()) fatal("can't insert sys.* objects in sys dict"); } |