mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Under NT, define sys.dllhandle and sys.winver (Mark H.).
This commit is contained in:
parent
4f1c59b818
commit
c606fe186f
1 changed files with 10 additions and 0 deletions
|
@ -49,6 +49,10 @@ int sys_checkinterval = 10;
|
||||||
|
|
||||||
static object *sysdict;
|
static object *sysdict;
|
||||||
|
|
||||||
|
#ifdef NT
|
||||||
|
extern void *PyWin_DLLhModule;
|
||||||
|
#endif
|
||||||
|
|
||||||
object *
|
object *
|
||||||
sysget(name)
|
sysget(name)
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -256,6 +260,12 @@ initsys()
|
||||||
dictinsert(sysdict, "builtin_module_names",
|
dictinsert(sysdict, "builtin_module_names",
|
||||||
v = list_builtin_module_names());
|
v = list_builtin_module_names());
|
||||||
XDECREF(v);
|
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())
|
if (err_occurred())
|
||||||
fatal("can't insert sys.* objects in sys dict");
|
fatal("can't insert sys.* objects in sys dict");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue