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
185ead6f
Kaydet (Commit)
185ead6f
authored
Kas 23, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Doc strings by Chris Petrilli.
üst
c16149b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
6 deletions
+44
-6
fcntlmodule.c
Modules/fcntlmodule.c
+44
-6
No files found.
Modules/fcntlmodule.c
Dosyayı görüntüle @
185ead6f
...
...
@@ -95,6 +95,15 @@ fcntl_fcntl(self, args)
return
PyInt_FromLong
((
long
)
ret
);
}
static
char
fcntl_doc
[]
=
"fcntl(fd, opt, [arg])
\n
\
\n
\
Perform the requested operation on file descriptor fd. The operation
\n
\
is defined by op and is operating system dependent. Typically these
\n
\
codes can be retrieved from the library module FCNTL. The argument arg
\n
\
is optional, and defaults to 0; it may be an int or a string."
;
/* ioctl(fd, opt, [arg]) */
...
...
@@ -146,6 +155,14 @@ fcntl_ioctl(self, args)
return
PyInt_FromLong
((
long
)
ret
);
}
static
char
ioctl_doc
[]
=
"ioctl(fd, opt, [arg])
\n
\
\n
\
Perform the requested operation on file descriptor fd. The operation
\n
\
is defined by op and is operating system dependent. Typically these
\n
\
codes can be retrieved from the library module IOCTL. The argument arg
\n
\
is optional, and defaults to 0; it may be an int or a string."
;
/* flock(fd, operation) */
...
...
@@ -198,6 +215,14 @@ fcntl_flock(self, args)
return
Py_None
;
}
static
char
flock_doc
[]
=
"flock(fd, operation)
\n
\
\n
\
Perform the lock operation op on file descriptor fd. See the Unix
\n
\
manual flock(3) for details. (On some systems, this function is
\n
\
emulated using fcntl().)"
;
/* lockf(fd, operation) */
static
PyObject
*
fcntl_lockf
(
self
,
args
)
...
...
@@ -244,17 +269,30 @@ fcntl_lockf(self, args)
return
Py_None
;
}
static
char
lockf_doc
[]
=
"lockf (fd, operation)
\n
\
\n
\
This is a wrapper around the FCNTL.F_SETLK and FCNTL.F_SETLKW fcntl()
\n
\
calls. See the Unix manual for details."
;
/* List of functions */
static
PyMethodDef
fcntl_methods
[]
=
{
{
"fcntl"
,
fcntl_fcntl
},
{
"ioctl"
,
fcntl_ioctl
},
{
"flock"
,
fcntl_flock
},
{
"lockf"
,
fcntl_lockf
,
1
},
{
"fcntl"
,
fcntl_fcntl
,
0
,
fcntl_doc
},
{
"ioctl"
,
fcntl_ioctl
,
0
,
ioctl_doc
},
{
"flock"
,
fcntl_flock
,
0
,
flock_doc
},
{
"lockf"
,
fcntl_lockf
,
1
,
lockf_doc
},
{
NULL
,
NULL
}
/* sentinel */
};
static
char
module_doc
[]
=
"This module performs file control and I/O control on file
\n
\
descriptors. It is an interface to the fcntl() and ioctl() Unix
\n
\
routines. File descriptors can be obtained with the fileno() method of
\n
\
a file or socket object."
;
/* Module initialisation */
static
int
...
...
@@ -287,8 +325,8 @@ initfcntl()
{
PyObject
*
m
,
*
d
;
/* Create the module and add the functions */
m
=
Py_InitModule
(
"fcntl"
,
fcntl_methods
);
/* Create the module and add the functions
and documentation
*/
m
=
Py_InitModule
3
(
"fcntl"
,
fcntl_methods
,
module_doc
);
/* Add some symbolic constants to the module */
d
=
PyModule_GetDict
(
m
);
...
...
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