Do not quote docstrings, they are quoted in the parser
parent
d88ca5016a
commit
64ee228c87
|
@ -793,7 +793,7 @@ _wrap__get_symbol(PyObject *self, PyObject *args)
|
|||
for name, cname, flags, docstring in functions:
|
||||
self.fp.write(' else if (!strcmp(name, "%s")) {\n' % name)
|
||||
self.fp.write(' static PyMethodDef ml = { '
|
||||
'"%s", (PyCFunction)%s, %s, "%s"};\n' % (
|
||||
'"%s", (PyCFunction)%s, %s, %s};\n' % (
|
||||
name, cname, flags, docstring))
|
||||
self.fp.write(' return PyCFunction_NewEx(&ml, NULL, modulename);\n')
|
||||
self.fp.write(' }\n')
|
||||
|
|
|
@ -10,7 +10,7 @@ def unescape(s):
|
|||
return s.replace('\r', '\\r').replace('\n', '\\n')
|
||||
|
||||
def make_docstring(lines):
|
||||
return "(char *) " + '\n'.join(['"%s"' % unescape(s) for s in lines])
|
||||
return "(char *) " + '\n'.join(['"%s"' % (unescape(s),) for s in lines])
|
||||
|
||||
# New Parameter class, wich emulates a tuple for compatibility reasons
|
||||
class Parameter(object):
|
||||
|
|
Loading…
Reference in New Issue