summaryrefslogtreecommitdiffstats
path: root/Modules/fcntlmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-13 20:33:02 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-06-13 20:33:02 (GMT)
commit14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f (patch)
tree7b150133cdd51df851c6bdaf261cd9ea30c149af /Modules/fcntlmodule.c
parent654c11ee3a2c9b72c040524c9cc4f95a1858f20b (diff)
downloadcpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.zip
cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.gz
cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.bz2
Patch #568124: Add doc string macros.
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r--Modules/fcntlmodule.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 13cd0f7..f1d89cc 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -72,8 +72,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
return PyInt_FromLong((long)ret);
}
-static char fcntl_doc [] =
-
+PyDoc_STRVAR(fcntl_doc,
"fcntl(fd, opt, [arg])\n\
\n\
Perform the requested operation on file descriptor fd. The operation\n\
@@ -84,7 +83,7 @@ the return value of fcntl is a string of that length, containing the\n\
resulting value put in the arg buffer by the operating system.The length\n\
of the arg string is not allowed to exceed 1024 bytes. If the arg given\n\
is an integer or if none is specified, the result value is an integer\n\
-corresponding to the return value of the fcntl call in the C code.";
+corresponding to the return value of the fcntl call in the C code.");
/* ioctl(fd, opt, [arg]) */
@@ -136,7 +135,7 @@ fcntl_ioctl(PyObject *self, PyObject *args)
return PyInt_FromLong((long)ret);
}
-static char ioctl_doc [] =
+PyDoc_STRVAR(ioctl_doc,
"ioctl(fd, opt, [arg])\n\
\n\
Perform the requested operation on file descriptor fd. The operation\n\
@@ -147,7 +146,7 @@ given as a string, the return value of ioctl is a string of that length,\n\
containing the resulting value put in the arg buffer by the operating system.\n\
The length of the arg string is not allowed to exceed 1024 bytes. If the arg\n\
given is an integer or if none is specified, the result value is an integer\n\
-corresponding to the return value of the ioctl call in the C code.";
+corresponding to the return value of the ioctl call in the C code.");
/* flock(fd, operation) */
@@ -202,12 +201,12 @@ fcntl_flock(PyObject *self, PyObject *args)
return Py_None;
}
-static char flock_doc [] =
+PyDoc_STRVAR(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().)";
+emulated using fcntl().)");
/* lockf(fd, operation) */
@@ -283,7 +282,7 @@ fcntl_lockf(PyObject *self, PyObject *args)
#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */
}
-static char lockf_doc [] =
+PyDoc_STRVAR(lockf_doc,
"lockf (fd, operation, length=0, start=0, whence=0)\n\
\n\
This is essentially a wrapper around the fcntl() locking calls. fd is the\n\
@@ -306,7 +305,7 @@ starts. whence is as with fileobj.seek(), specifically:\n\
\n\
0 - relative to the start of the file (SEEK_SET)\n\
1 - relative to the current buffer position (SEEK_CUR)\n\
- 2 - relative to the end of the file (SEEK_END)";
+ 2 - relative to the end of the file (SEEK_END)");
/* List of functions */
@@ -319,12 +318,11 @@ static PyMethodDef fcntl_methods[] = {
};
-static char module_doc [] =
-
+PyDoc_STRVAR(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.";
+a file or socket object.");
/* Module initialisation */