Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
6b9b7276
Kaydet (Commit)
6b9b7276
authored
May 04, 2012
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove dead Windows code which no longer will compile.
üst
a6685e8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
154 deletions
+0
-154
pythoncore.vcproj
PC/VS7.1/pythoncore.vcproj
+0
-27
pythoncore.vcproj
PC/VS8.0/pythoncore.vcproj
+0
-4
import_nt.c
PC/import_nt.c
+0
-117
import.c
Python/import.c
+0
-6
No files found.
PC/VS7.1/pythoncore.vcproj
Dosyayı görüntüle @
6b9b7276
...
...
@@ -615,33 +615,6 @@
<File
RelativePath=
"..\..\Python\import.c"
>
</File>
<File
RelativePath=
"..\..\PC\import_nt.c"
>
<FileConfiguration
Name=
"Release|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
"..\..\Python"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
"..\..\Python"
/>
</FileConfiguration>
<FileConfiguration
Name=
"ReleaseItanium|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
"..\..\Python"
/>
</FileConfiguration>
<FileConfiguration
Name=
"ReleaseAMD64|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
"..\..\Python"
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\Python\importdl.c"
>
</File>
...
...
PC/VS8.0/pythoncore.vcproj
Dosyayı görüntüle @
6b9b7276
...
...
@@ -1706,10 +1706,6 @@
RelativePath=
"..\..\PC\getpathp.c"
>
</File>
<File
RelativePath=
"..\..\PC\import_nt.c"
>
</File>
<File
RelativePath=
"..\..\PC\msvcrtmodule.c"
>
...
...
PC/import_nt.c
deleted
100644 → 0
Dosyayı görüntüle @
a6685e8d
/********************************************************************
import_nt.c
Win32 specific import code.
*/
#include "Python.h"
#include "osdefs.h"
#include <windows.h>
#include "importdl.h"
#include "malloc.h"
/* for alloca */
/* a string loaded from the DLL at startup */
extern
const
char
*
PyWin_DLLVersionString
;
/* Find a module on Windows.
Read the registry Software\Python\PythonCore\<version>\Modules\<name> (or
Software\Python\PythonCore\<version>\Modules\<name>\Debug in debug mode)
from HKEY_CURRENT_USER, or HKEY_LOCAL_MACHINE. Find the file descriptor using
the file extension. Open the file.
On success, write the file descriptor into *ppFileDesc, the module path
(Unicode object) into *pPath, and return the opened file object. If the
module cannot be found (e.g. no registry key or the file doesn't exist),
return NULL. On error, raise a Python exception and return NULL.
*/
FILE
*
_PyWin_FindRegisteredModule
(
PyObject
*
moduleName
,
struct
filedescr
**
ppFileDesc
,
PyObject
**
pPath
)
{
wchar_t
pathBuf
[
MAXPATHLEN
+
1
];
int
pathLen
=
MAXPATHLEN
+
1
;
PyObject
*
path
,
*
moduleKey
,
*
suffix
;
wchar_t
*
wmoduleKey
,
*
wsuffix
;
struct
filedescr
*
fdp
;
HKEY
keyBase
;
int
modNameSize
;
long
regStat
;
Py_ssize_t
extLen
;
FILE
*
fp
;
moduleKey
=
PyUnicode_FromFormat
(
#ifdef _DEBUG
/* In debugging builds, we _must_ have the debug version registered */
"Software
\\
Python
\\
PythonCore
\\
%s
\\
Modules
\\
%U
\\
Debug"
,
#else
"Software
\\
Python
\\
PythonCore
\\
%s
\\
Modules
\\
%U"
,
#endif
PyWin_DLLVersionString
,
moduleName
);
if
(
moduleKey
==
NULL
)
return
NULL
;
wmoduleKey
=
PyUnicode_AsUnicode
(
moduleKey
);
if
(
wmoduleKey
==
NULL
)
{
Py_DECREF
(
moduleKey
);
return
NULL
;
}
keyBase
=
HKEY_CURRENT_USER
;
modNameSize
=
pathLen
;
regStat
=
RegQueryValueW
(
keyBase
,
wmoduleKey
,
pathBuf
,
&
modNameSize
);
if
(
regStat
!=
ERROR_SUCCESS
)
{
/* No user setting - lookup in machine settings */
keyBase
=
HKEY_LOCAL_MACHINE
;
/* be anal - failure may have reset size param */
modNameSize
=
pathLen
;
regStat
=
RegQueryValueW
(
keyBase
,
wmoduleKey
,
pathBuf
,
&
modNameSize
);
if
(
regStat
!=
ERROR_SUCCESS
)
{
Py_DECREF
(
moduleKey
);
return
NULL
;
}
}
Py_DECREF
(
moduleKey
);
if
(
modNameSize
<
3
)
{
/* path shorter than "a.o" or negative length (cast to
size_t is wrong) */
return
NULL
;
}
/* use the file extension to locate the type entry. */
for
(
fdp
=
_PyImport_Filetab
;
fdp
->
suffix
!=
NULL
;
fdp
++
)
{
suffix
=
PyUnicode_FromString
(
fdp
->
suffix
);
if
(
suffix
==
NULL
)
return
NULL
;
wsuffix
=
PyUnicode_AsUnicodeAndSize
(
suffix
,
&
extLen
);
if
(
wsuffix
==
NULL
)
{
Py_DECREF
(
suffix
);
return
NULL
;
}
if
((
Py_ssize_t
)
modNameSize
>
extLen
&&
_wcsnicmp
(
pathBuf
+
((
Py_ssize_t
)
modNameSize
-
extLen
-
1
),
wsuffix
,
extLen
)
==
0
)
{
Py_DECREF
(
suffix
);
break
;
}
Py_DECREF
(
suffix
);
}
if
(
fdp
->
suffix
==
NULL
)
return
NULL
;
path
=
PyUnicode_FromWideChar
(
pathBuf
,
wcslen
(
pathBuf
));
if
(
path
==
NULL
)
return
NULL
;
fp
=
_Py_fopen
(
path
,
fdp
->
mode
);
if
(
fp
==
NULL
)
{
Py_DECREF
(
path
);
return
NULL
;
}
*
pPath
=
path
;
*
ppFileDesc
=
fdp
;
return
fp
;
}
Python/import.c
Dosyayı görüntüle @
6b9b7276
...
...
@@ -1150,12 +1150,6 @@ PyImport_GetImporter(PyObject *path) {
}
#ifdef MS_COREDLL
extern
FILE
*
_PyWin_FindRegisteredModule
(
PyObject
*
,
struct
filedescr
**
,
PyObject
**
p_path
);
#endif
static
int
init_builtin
(
PyObject
*
);
/* Forward */
/* Initialize a built-in module.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment