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
c172f268
Kaydet (Commit)
c172f268
authored
Eyl 09, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Deleted find_module_in_package and find_module_in_directory -- they
aren't needed and it was a mistake to add them.
üst
3cdb8f32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
53 deletions
+0
-53
import.c
Python/import.c
+0
-53
No files found.
Python/import.c
Dosyayı görüntüle @
c172f268
...
...
@@ -1787,61 +1787,8 @@ imp_new_module(self, args)
return
PyModule_New
(
name
);
}
static
PyObject
*
imp_find_module_in_package
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
{
char
*
name
;
PyObject
*
packagename
=
NULL
;
PyObject
*
package
;
PyObject
*
modules
;
PyObject
*
path
;
if
(
!
PyArg_ParseTuple
(
args
,
"s|S"
,
&
name
,
&
packagename
))
return
NULL
;
if
(
packagename
==
NULL
||
PyString_GET_SIZE
(
packagename
)
==
0
)
{
return
call_find_module
(
name
,
(
PyObject
*
)
NULL
);
}
modules
=
PyImport_GetModuleDict
();
package
=
PyDict_GetItem
(
modules
,
packagename
);
if
(
package
==
NULL
)
{
PyErr_Format
(
PyExc_ImportError
,
"No package named %.200s"
,
PyString_AS_STRING
(
packagename
));
return
NULL
;
}
path
=
PyObject_GetAttrString
(
package
,
"__path__"
);
if
(
path
==
NULL
)
{
PyErr_Format
(
PyExc_ImportError
,
"Package %.200s has no __path__ attribute"
,
PyString_AS_STRING
(
packagename
));
return
NULL
;
}
return
call_find_module
(
name
,
path
);
}
static
PyObject
*
imp_find_module_in_directory
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
{
char
*
name
;
PyObject
*
directory
;
PyObject
*
path
;
if
(
!
PyArg_ParseTuple
(
args
,
"sS"
,
&
name
,
&
directory
))
return
NULL
;
path
=
Py_BuildValue
(
"[O]"
,
directory
);
if
(
path
==
NULL
)
return
NULL
;
return
call_find_module
(
name
,
path
);
}
static
PyMethodDef
imp_methods
[]
=
{
{
"find_module"
,
imp_find_module
,
1
},
{
"find_module_in_directory"
,
imp_find_module_in_directory
,
1
},
{
"find_module_in_package"
,
imp_find_module_in_package
,
1
},
{
"get_frozen_object"
,
imp_get_frozen_object
,
1
},
{
"get_magic"
,
imp_get_magic
,
1
},
{
"get_suffixes"
,
imp_get_suffixes
,
1
},
...
...
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