Under NT, define sys.dllhandle and sys.winver (Mark H.).

This commit is contained in:
Guido van Rossum 1996-04-09 02:37:57 +00:00
parent 4f1c59b818
commit c606fe186f
1 changed files with 10 additions and 0 deletions

View File

@ -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");
}