summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-04-09 02:37:57 (GMT)
committerGuido van Rossum <guido@python.org>1996-04-09 02:37:57 (GMT)
commitc606fe186f4b2e1d962651ae3ea34325c65b83dc (patch)
treefbae3813bfa169efdc9fd606df48c8f4797e3340 /Python/sysmodule.c
parent4f1c59b818575a2b9400a7479f7adc8e0521d1f7 (diff)
downloadcpython-c606fe186f4b2e1d962651ae3ea34325c65b83dc.zip
cpython-c606fe186f4b2e1d962651ae3ea34325c65b83dc.tar.gz
cpython-c606fe186f4b2e1d962651ae3ea34325c65b83dc.tar.bz2
Under NT, define sys.dllhandle and sys.winver (Mark H.).
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c10
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");
}