Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 23832:ed1ba37a46b7 legacy-trunk
Patch #568124: Add doc string macros.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 13 Jun 2002 20:33:02 +0000 |
| parents | fba57e40f547 |
| children | d6ae544acd24 |
line wrap: on
line diff
--- a/Python/import.c Thu Jun 13 20:24:17 2002 +0000 +++ b/Python/import.c Thu Jun 13 20:33:02 2002 +0000 @@ -2455,47 +2455,40 @@ /* Doc strings */ -static char doc_imp[] = "\ -This module provides the components needed to build your own\n\ -__import__ function. Undocumented functions are obsolete.\n\ -"; +PyDoc_STRVAR(doc_imp, +"This module provides the components needed to build your own\n\ +__import__ function. Undocumented functions are obsolete."); -static char doc_find_module[] = "\ -find_module(name, [path]) -> (file, filename, (suffix, mode, type))\n\ +PyDoc_STRVAR(doc_find_module, +"find_module(name, [path]) -> (file, filename, (suffix, mode, type))\n\ Search for a module. If path is omitted or None, search for a\n\ built-in, frozen or special module and continue search in sys.path.\n\ The module name cannot contain '.'; to search for a submodule of a\n\ -package, pass the submodule name and the package's __path__.\ -"; +package, pass the submodule name and the package's __path__."); -static char doc_load_module[] = "\ -load_module(name, file, filename, (suffix, mode, type)) -> module\n\ +PyDoc_STRVAR(doc_load_module, +"load_module(name, file, filename, (suffix, mode, type)) -> module\n\ Load a module, given information returned by find_module().\n\ -The module name must include the full package name, if any.\ -"; +The module name must include the full package name, if any."); -static char doc_get_magic[] = "\ -get_magic() -> string\n\ -Return the magic number for .pyc or .pyo files.\ -"; +PyDoc_STRVAR(doc_get_magic, +"get_magic() -> string\n\ +Return the magic number for .pyc or .pyo files."); -static char doc_get_suffixes[] = "\ -get_suffixes() -> [(suffix, mode, type), ...]\n\ +PyDoc_STRVAR(doc_get_suffixes, +"get_suffixes() -> [(suffix, mode, type), ...]\n\ Return a list of (suffix, mode, type) tuples describing the files\n\ -that find_module() looks for.\ -"; +that find_module() looks for."); -static char doc_new_module[] = "\ -new_module(name) -> module\n\ +PyDoc_STRVAR(doc_new_module, +"new_module(name) -> module\n\ Create a new module. Do not enter it in sys.modules.\n\ -The module name must include the full package name, if any.\ -"; +The module name must include the full package name, if any."); -static char doc_lock_held[] = "\ -lock_held() -> 0 or 1\n\ +PyDoc_STRVAR(doc_lock_held, +"lock_held() -> 0 or 1\n\ Return 1 if the import lock is currently held.\n\ -On platforms without threads, return 0.\ -"; +On platforms without threads, return 0."); static PyMethodDef imp_methods[] = { {"find_module", imp_find_module, METH_VARARGS, doc_find_module},
