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
bc459bb4
Kaydet (Commit)
bc459bb4
authored
May 06, 2012
tarafından
Nadeem Vawda
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rename lzma.check_is_supported() to is_check_supported() to avoid grammatical confusion.
üst
f55b329e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
lzma.rst
Doc/library/lzma.rst
+1
-1
lzma.py
Lib/lzma.py
+1
-1
test_lzma.py
Lib/test/test_lzma.py
+4
-4
_lzmamodule.c
Modules/_lzmamodule.c
+6
-6
No files found.
Doc/library/lzma.rst
Dosyayı görüntüle @
bc459bb4
...
...
@@ -225,7 +225,7 @@ Compressing and decompressing data in memory
Miscellaneous
-------------
.. function::
check_is
_supported(check)
.. function::
is_check
_supported(check)
Returns true if the given integrity check is supported on this system.
...
...
Lib/lzma.py
Dosyayı görüntüle @
bc459bb4
...
...
@@ -18,7 +18,7 @@ __all__ = [
"MODE_FAST"
,
"MODE_NORMAL"
,
"PRESET_DEFAULT"
,
"PRESET_EXTREME"
,
"LZMACompressor"
,
"LZMADecompressor"
,
"LZMAFile"
,
"LZMAError"
,
"compress"
,
"decompress"
,
"
check_is
_supported"
,
"compress"
,
"decompress"
,
"
is_check
_supported"
,
"encode_filter_properties"
,
"decode_filter_properties"
,
]
...
...
Lib/test/test_lzma.py
Dosyayı görüntüle @
bc459bb4
...
...
@@ -935,14 +935,14 @@ class MiscellaneousTestCase(unittest.TestCase):
def
test_is_check_supported
(
self
):
# CHECK_NONE and CHECK_CRC32 should always be supported,
# regardless of the options liblzma was compiled with.
self
.
assertTrue
(
lzma
.
check_is
_supported
(
lzma
.
CHECK_NONE
))
self
.
assertTrue
(
lzma
.
check_is
_supported
(
lzma
.
CHECK_CRC32
))
self
.
assertTrue
(
lzma
.
is_check
_supported
(
lzma
.
CHECK_NONE
))
self
.
assertTrue
(
lzma
.
is_check
_supported
(
lzma
.
CHECK_CRC32
))
# The .xz format spec cannot store check IDs above this value.
self
.
assertFalse
(
lzma
.
check_is
_supported
(
lzma
.
CHECK_ID_MAX
+
1
))
self
.
assertFalse
(
lzma
.
is_check
_supported
(
lzma
.
CHECK_ID_MAX
+
1
))
# This value should not be a valid check ID.
self
.
assertFalse
(
lzma
.
check_is
_supported
(
lzma
.
CHECK_UNKNOWN
))
self
.
assertFalse
(
lzma
.
is_check
_supported
(
lzma
.
CHECK_UNKNOWN
))
def
test_encode_filter_properties
(
self
):
with
self
.
assertRaises
(
TypeError
):
...
...
Modules/_lzmamodule.c
Dosyayı görüntüle @
bc459bb4
...
...
@@ -1075,19 +1075,19 @@ static PyTypeObject Decompressor_type = {
/* Module-level functions. */
PyDoc_STRVAR
(
check_is
_supported_doc
,
"
check_is
_supported(check_id) -> bool
\n
"
PyDoc_STRVAR
(
is_check
_supported_doc
,
"
is_check
_supported(check_id) -> bool
\n
"
"
\n
"
"Test whether the given integrity check is supported.
\n
"
"
\n
"
"Always returns True for CHECK_NONE and CHECK_CRC32.
\n
"
);
static
PyObject
*
check_is
_supported
(
PyObject
*
self
,
PyObject
*
args
)
is_check
_supported
(
PyObject
*
self
,
PyObject
*
args
)
{
int
check_id
;
if
(
!
PyArg_ParseTuple
(
args
,
"i:
check_is
_supported"
,
&
check_id
))
if
(
!
PyArg_ParseTuple
(
args
,
"i:
is_check
_supported"
,
&
check_id
))
return
NULL
;
return
PyBool_FromLong
(
lzma_check_is_supported
(
check_id
));
...
...
@@ -1182,8 +1182,8 @@ decode_filter_properties(PyObject *self, PyObject *args)
/* Module initialization. */
static
PyMethodDef
module_methods
[]
=
{
{
"
check_is_supported"
,
(
PyCFunction
)
check_is
_supported
,
METH_VARARGS
,
check_is
_supported_doc
},
{
"
is_check_supported"
,
(
PyCFunction
)
is_check
_supported
,
METH_VARARGS
,
is_check
_supported_doc
},
{
"encode_filter_properties"
,
(
PyCFunction
)
encode_filter_properties
,
METH_VARARGS
,
encode_filter_properties_doc
},
{
"decode_filter_properties"
,
(
PyCFunction
)
decode_filter_properties
,
...
...
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