diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-06-13 20:33:02 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-06-13 20:33:02 (GMT) |
commit | 14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f (patch) | |
tree | 7b150133cdd51df851c6bdaf261cd9ea30c149af /Modules/pyexpat.c | |
parent | 654c11ee3a2c9b72c040524c9cc4f95a1858f20b (diff) | |
download | cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.zip cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.gz cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.bz2 |
Patch #568124: Add doc string macros.
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 3153693..ae8bf1b 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -625,9 +625,9 @@ VOID_HANDLER(EndDoctypeDecl, (void *userData), ("()")) /* ---------------------------------------------------------------- */ -static char xmlparse_Parse__doc__[] = +PyDoc_STRVAR(xmlparse_Parse__doc__, "Parse(data[, isfinal])\n\ -Parse XML data. `isfinal' should be true at end of input."; +Parse XML data. `isfinal' should be true at end of input."); static PyObject * xmlparse_Parse(xmlparseobject *self, PyObject *args) @@ -695,9 +695,9 @@ finally: return len; } -static char xmlparse_ParseFile__doc__[] = +PyDoc_STRVAR(xmlparse_ParseFile__doc__, "ParseFile(file)\n\ -Parse XML data from file-like object."; +Parse XML data from file-like object."); static PyObject * xmlparse_ParseFile(xmlparseobject *self, PyObject *args) @@ -754,9 +754,9 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *args) return Py_BuildValue("i", rv); } -static char xmlparse_SetBase__doc__[] = +PyDoc_STRVAR(xmlparse_SetBase__doc__, "SetBase(base_url)\n\ -Set the base URL for the parser."; +Set the base URL for the parser."); static PyObject * xmlparse_SetBase(xmlparseobject *self, PyObject *args) @@ -772,9 +772,9 @@ xmlparse_SetBase(xmlparseobject *self, PyObject *args) return Py_None; } -static char xmlparse_GetBase__doc__[] = +PyDoc_STRVAR(xmlparse_GetBase__doc__, "GetBase() -> url\n\ -Return base URL string for the parser."; +Return base URL string for the parser."); static PyObject * xmlparse_GetBase(xmlparseobject *self, PyObject *args) @@ -785,11 +785,11 @@ xmlparse_GetBase(xmlparseobject *self, PyObject *args) return Py_BuildValue("z", XML_GetBase(self->itself)); } -static char xmlparse_GetInputContext__doc__[] = +PyDoc_STRVAR(xmlparse_GetInputContext__doc__, "GetInputContext() -> string\n\ Return the untranslated text of the input that caused the current event.\n\ If the event was generated by a large amount of text (such as a start tag\n\ -for an element with many attributes), not all of the text may be available."; +for an element with many attributes), not all of the text may be available."); static PyObject * xmlparse_GetInputContext(xmlparseobject *self, PyObject *args) @@ -817,10 +817,10 @@ xmlparse_GetInputContext(xmlparseobject *self, PyObject *args) return result; } -static char xmlparse_ExternalEntityParserCreate__doc__[] = +PyDoc_STRVAR(xmlparse_ExternalEntityParserCreate__doc__, "ExternalEntityParserCreate(context[, encoding])\n\ Create a parser for parsing an external entity based on the\n\ -information passed to the ExternalEntityRefHandler."; +information passed to the ExternalEntityRefHandler."); static PyObject * xmlparse_ExternalEntityParserCreate(xmlparseobject *self, PyObject *args) @@ -892,13 +892,13 @@ xmlparse_ExternalEntityParserCreate(xmlparseobject *self, PyObject *args) return (PyObject *)new_parser; } -static char xmlparse_SetParamEntityParsing__doc__[] = +PyDoc_STRVAR(xmlparse_SetParamEntityParsing__doc__, "SetParamEntityParsing(flag) -> success\n\ Controls parsing of parameter entities (including the external DTD\n\ subset). Possible flag values are XML_PARAM_ENTITY_PARSING_NEVER,\n\ XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE and\n\ XML_PARAM_ENTITY_PARSING_ALWAYS. Returns true if setting the flag\n\ -was successful."; +was successful."); static PyObject* xmlparse_SetParamEntityParsing(xmlparseobject *p, PyObject* args) @@ -1225,8 +1225,7 @@ xmlparse_clear(xmlparseobject *op) } #endif -static char Xmlparsetype__doc__[] = -"XML parser"; +PyDoc_STRVAR(Xmlparsetype__doc__, "XML parser"); static PyTypeObject Xmlparsetype = { PyObject_HEAD_INIT(NULL) @@ -1267,9 +1266,9 @@ static PyTypeObject Xmlparsetype = { /* End of code for xmlparser objects */ /* -------------------------------------------------------- */ -static char pyexpat_ParserCreate__doc__[] = +PyDoc_STRVAR(pyexpat_ParserCreate__doc__, "ParserCreate([encoding[, namespace_separator]]) -> parser\n\ -Return a new XML parser object."; +Return a new XML parser object."); static PyObject * pyexpat_ParserCreate(PyObject *notused, PyObject *args, PyObject *kw) @@ -1291,9 +1290,9 @@ pyexpat_ParserCreate(PyObject *notused, PyObject *args, PyObject *kw) return newxmlparseobject(encoding, namespace_separator); } -static char pyexpat_ErrorString__doc__[] = +PyDoc_STRVAR(pyexpat_ErrorString__doc__, "ErrorString(errno) -> string\n\ -Returns string error for given number."; +Returns string error for given number."); static PyObject * pyexpat_ErrorString(PyObject *self, PyObject *args) @@ -1318,8 +1317,8 @@ static struct PyMethodDef pyexpat_methods[] = { /* Module docstring */ -static char pyexpat_module_documentation[] = -"Python wrapper for Expat parser."; +PyDoc_STRVAR(pyexpat_module_documentation, +"Python wrapper for Expat parser."); #if PY_VERSION_HEX < 0x20000F0 |