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
961fe17b
Kaydet (Commit)
961fe17b
authored
Haz 03, 2000
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add missing PyArg_NoArgs() calls to methods that didn't take arguments
(Pointed out by Moshe Zadka)
üst
b853ea05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
mmapmodule.c
Modules/mmapmodule.c
+16
-8
No files found.
Modules/mmapmodule.c
Dosyayı görüntüle @
961fe17b
...
...
@@ -75,6 +75,8 @@ mmap_object_dealloc(mmap_object * m_obj)
static
PyObject
*
mmap_close_method
(
mmap_object
*
self
,
PyObject
*
args
)
{
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
#ifdef MS_WIN32
UnmapViewOfFile
(
self
->
data
);
CloseHandle
(
self
->
map_handle
);
...
...
@@ -118,6 +120,8 @@ mmap_read_byte_method (mmap_object * self,
char
value
;
char
*
where
;
CHECK_VALID
(
NULL
);
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
if
(
self
->
pos
>=
0
&&
self
->
pos
<
self
->
size
)
{
where
=
self
->
data
+
self
->
pos
;
value
=
(
char
)
*
(
where
);
...
...
@@ -131,7 +135,7 @@ mmap_read_byte_method (mmap_object * self,
static
PyObject
*
mmap_read_line_method
(
mmap_object
*
self
,
PyObject
*
args
)
PyObject
*
args
)
{
char
*
start
=
self
->
data
+
self
->
pos
;
char
*
eof
=
self
->
data
+
self
->
size
;
...
...
@@ -139,6 +143,8 @@ mmap_read_line_method (mmap_object * self,
PyObject
*
result
;
CHECK_VALID
(
NULL
);
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
eol
=
memchr
(
start
,
'\n'
,
self
->
size
-
self
->
pos
);
if
(
!
eol
)
...
...
@@ -153,7 +159,7 @@ mmap_read_line_method (mmap_object * self,
static
PyObject
*
mmap_read_method
(
mmap_object
*
self
,
PyObject
*
args
)
PyObject
*
args
)
{
long
num_bytes
;
PyObject
*
result
;
...
...
@@ -225,7 +231,7 @@ mmap_write_method (mmap_object * self,
static
PyObject
*
mmap_write_byte_method
(
mmap_object
*
self
,
PyObject
*
args
)
PyObject
*
args
)
{
char
value
;
...
...
@@ -241,9 +247,11 @@ mmap_write_byte_method (mmap_object * self,
static
PyObject
*
mmap_size_method
(
mmap_object
*
self
,
PyObject
*
args
)
PyObject
*
args
)
{
CHECK_VALID
(
NULL
);
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
#ifdef MS_WIN32
if
(
self
->
file_handle
!=
(
HFILE
)
0xFFFFFFFF
)
{
...
...
@@ -346,6 +354,8 @@ static PyObject *
mmap_tell_method
(
mmap_object
*
self
,
PyObject
*
args
)
{
CHECK_VALID
(
NULL
);
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
return
(
Py_BuildValue
(
"l"
,
self
->
pos
)
);
}
...
...
@@ -462,10 +472,7 @@ static struct PyMethodDef mmap_object_methods[] = {
/* Functions for treating an mmap'ed file as a buffer */
static
int
mmap_buffer_getreadbuf
(
self
,
index
,
ptr
)
mmap_object
*
self
;
int
index
;
const
void
**
ptr
;
mmap_buffer_getreadbuf
(
mmap_object
*
self
,
int
index
,
const
void
**
ptr
)
{
CHECK_VALID
(
-
1
);
if
(
index
!=
0
)
{
...
...
@@ -867,3 +874,4 @@ initmmap(void)
#endif
/* MS_WIN32 */
}
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