[Python]
Escape backslashes in docstrings. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
26e8cc0797
commit
af2d15d2a5
2 changed files with 6 additions and 0 deletions
|
|
@ -1419,6 +1419,7 @@ public:
|
|||
} else if (Getattr(n, "feature:callback")) {
|
||||
if (have_docstring(n)) {
|
||||
String *ds = docstring(n, AUTODOC_FUNC, "", false);
|
||||
Replaceall(ds, "\\", "\\\\");
|
||||
Replaceall(ds, "\n", "\\n");
|
||||
Replaceall(ds, "\"", "\\\"");
|
||||
Printf(methods, "(char *)\"%s\\nswig_ptr: %s\"", ds, Getattr(n, "feature:callback:name"));
|
||||
|
|
@ -1427,6 +1428,7 @@ public:
|
|||
}
|
||||
} else if (have_docstring(n)) {
|
||||
String *ds = docstring(n, AUTODOC_FUNC, "", false);
|
||||
Replaceall(ds, "\\", "\\\\");
|
||||
Replaceall(ds, "\n", "\\n");
|
||||
Replaceall(ds, "\"", "\\\"");
|
||||
Printf(methods, "(char *)\"%s\"", ds);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue