Slightly different Windows ifdefs

This commit is contained in:
Guido van Rossum 1996-06-28 20:15:15 +00:00
parent 919c576254
commit 6f489d989d
4 changed files with 8 additions and 9 deletions

View file

@ -415,7 +415,7 @@ find_module(name, path, buf, buflen, p_fp)
struct filedescr *fdp;
FILE *fp = NULL;
#ifdef NT
#ifdef PYTHONWIN
if ((fp=PyWin_FindRegisteredModule(name, &fdp, buf, buflen))!=NULL) {
*p_fp = fp;
return fdp;
@ -463,12 +463,11 @@ find_module(name, path, buf, buflen, p_fp)
buf[len++] = ch;
}
else /* Not in dos_8x3, use the full name */
#else
#endif
{
strcpy(buf+len, name);
len += namelen;
}
#endif
for (fdp = import_filetab; fdp->suffix != NULL; fdp++) {
strcpy(buf+len, fdp->suffix);
if (verbose > 1)

View file

@ -269,7 +269,7 @@ initsys()
dictinsert(sysdict, "builtin_module_names",
v = list_builtin_module_names());
XDECREF(v);
#ifdef NT
#ifdef PYTHONWIN
dictinsert(sysdict, "dllhandle", v = newintobject((int)PyWin_DLLhModule));
XDECREF(v);
dictinsert(sysdict, "winver", v = newstringobject(WIN32_PATCH_LEVEL));