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
08ea61ad
Kaydet (Commit)
08ea61ad
authored
Şub 17, 2003
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead
üst
e241ce83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
23 deletions
+13
-23
import.c
Python/import.c
+13
-23
No files found.
Python/import.c
Dosyayı görüntüle @
08ea61ad
...
@@ -286,10 +286,8 @@ unlock_import(void)
...
@@ -286,10 +286,8 @@ unlock_import(void)
#endif
#endif
static
PyObject
*
static
PyObject
*
imp_lock_held
(
PyObject
*
self
,
PyObject
*
args
)
imp_lock_held
(
PyObject
*
self
,
PyObject
*
no
args
)
{
{
if
(
!
PyArg_ParseTuple
(
args
,
":lock_held"
))
return
NULL
;
#ifdef WITH_THREAD
#ifdef WITH_THREAD
return
PyBool_FromLong
(
import_lock_thread
!=
-
1
);
return
PyBool_FromLong
(
import_lock_thread
!=
-
1
);
#else
#else
...
@@ -298,10 +296,8 @@ imp_lock_held(PyObject *self, PyObject *args)
...
@@ -298,10 +296,8 @@ imp_lock_held(PyObject *self, PyObject *args)
}
}
static
PyObject
*
static
PyObject
*
imp_acquire_lock
(
PyObject
*
self
,
PyObject
*
args
)
imp_acquire_lock
(
PyObject
*
self
,
PyObject
*
no
args
)
{
{
if
(
!
PyArg_ParseTuple
(
args
,
":acquire_lock"
))
return
NULL
;
#ifdef WITH_THREAD
#ifdef WITH_THREAD
lock_import
();
lock_import
();
#endif
#endif
...
@@ -310,10 +306,8 @@ imp_acquire_lock(PyObject *self, PyObject *args)
...
@@ -310,10 +306,8 @@ imp_acquire_lock(PyObject *self, PyObject *args)
}
}
static
PyObject
*
static
PyObject
*
imp_release_lock
(
PyObject
*
self
,
PyObject
*
args
)
imp_release_lock
(
PyObject
*
self
,
PyObject
*
no
args
)
{
{
if
(
!
PyArg_ParseTuple
(
args
,
":release_lock"
))
return
NULL
;
#ifdef WITH_THREAD
#ifdef WITH_THREAD
if
(
unlock_import
()
<
0
)
{
if
(
unlock_import
()
<
0
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
PyErr_SetString
(
PyExc_RuntimeError
,
...
@@ -2428,12 +2422,10 @@ PyImport_Import(PyObject *module_name)
...
@@ -2428,12 +2422,10 @@ PyImport_Import(PyObject *module_name)
*/
*/
static
PyObject
*
static
PyObject
*
imp_get_magic
(
PyObject
*
self
,
PyObject
*
args
)
imp_get_magic
(
PyObject
*
self
,
PyObject
*
no
args
)
{
{
char
buf
[
4
];
char
buf
[
4
];
if
(
!
PyArg_ParseTuple
(
args
,
":get_magic"
))
return
NULL
;
buf
[
0
]
=
(
char
)
((
pyc_magic
>>
0
)
&
0xff
);
buf
[
0
]
=
(
char
)
((
pyc_magic
>>
0
)
&
0xff
);
buf
[
1
]
=
(
char
)
((
pyc_magic
>>
8
)
&
0xff
);
buf
[
1
]
=
(
char
)
((
pyc_magic
>>
8
)
&
0xff
);
buf
[
2
]
=
(
char
)
((
pyc_magic
>>
16
)
&
0xff
);
buf
[
2
]
=
(
char
)
((
pyc_magic
>>
16
)
&
0xff
);
...
@@ -2443,13 +2435,11 @@ imp_get_magic(PyObject *self, PyObject *args)
...
@@ -2443,13 +2435,11 @@ imp_get_magic(PyObject *self, PyObject *args)
}
}
static
PyObject
*
static
PyObject
*
imp_get_suffixes
(
PyObject
*
self
,
PyObject
*
args
)
imp_get_suffixes
(
PyObject
*
self
,
PyObject
*
no
args
)
{
{
PyObject
*
list
;
PyObject
*
list
;
struct
filedescr
*
fdp
;
struct
filedescr
*
fdp
;
if
(
!
PyArg_ParseTuple
(
args
,
":get_suffixes"
))
return
NULL
;
list
=
PyList_New
(
0
);
list
=
PyList_New
(
0
);
if
(
list
==
NULL
)
if
(
list
==
NULL
)
return
NULL
;
return
NULL
;
...
@@ -2791,14 +2781,14 @@ Release the interpreter's import lock.\n\
...
@@ -2791,14 +2781,14 @@ Release the interpreter's import lock.\n\
On platforms without threads, this function does nothing."
);
On platforms without threads, this function does nothing."
);
static
PyMethodDef
imp_methods
[]
=
{
static
PyMethodDef
imp_methods
[]
=
{
{
"find_module"
,
imp_find_module
,
METH_VARARGS
,
doc_find_module
},
{
"find_module"
,
imp_find_module
,
METH_VARARGS
,
doc_find_module
},
{
"get_magic"
,
imp_get_magic
,
METH_VARARGS
,
doc_get_magic
},
{
"get_magic"
,
imp_get_magic
,
METH_NOARGS
,
doc_get_magic
},
{
"get_suffixes"
,
imp_get_suffixes
,
METH_VARARGS
,
doc_get_suffixes
},
{
"get_suffixes"
,
imp_get_suffixes
,
METH_NOARGS
,
doc_get_suffixes
},
{
"load_module"
,
imp_load_module
,
METH_VARARGS
,
doc_load_module
},
{
"load_module"
,
imp_load_module
,
METH_VARARGS
,
doc_load_module
},
{
"new_module"
,
imp_new_module
,
METH_VARARGS
,
doc_new_module
},
{
"new_module"
,
imp_new_module
,
METH_VARARGS
,
doc_new_module
},
{
"lock_held"
,
imp_lock_held
,
METH_VARARGS
,
doc_lock_held
},
{
"lock_held"
,
imp_lock_held
,
METH_NOARGS
,
doc_lock_held
},
{
"acquire_lock"
,
imp_acquire_lock
,
METH_VARARGS
,
doc_acquire_lock
},
{
"acquire_lock"
,
imp_acquire_lock
,
METH_NOARGS
,
doc_acquire_lock
},
{
"release_lock"
,
imp_release_lock
,
METH_VARARGS
,
doc_release_lock
},
{
"release_lock"
,
imp_release_lock
,
METH_NOARGS
,
doc_release_lock
},
/* The rest are obsolete */
/* The rest are obsolete */
{
"get_frozen_object"
,
imp_get_frozen_object
,
METH_VARARGS
},
{
"get_frozen_object"
,
imp_get_frozen_object
,
METH_VARARGS
},
{
"init_builtin"
,
imp_init_builtin
,
METH_VARARGS
},
{
"init_builtin"
,
imp_init_builtin
,
METH_VARARGS
},
...
...
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