[vtk-developers] vtkWrapPython.c: truncated doc strings.

David Gobbi dgobbi at irus.rri.ca
Fri Nov 9 02:39:22 EST 2001


On Fri, 9 Nov 2001, Prabhu Ramachandran wrote:

> hi,
>
> Noticed that doc strings for vtkpython longer than 4096 chars are
> truncated.  More docs the merrier, so IMHO this is not a good thing to
> do.  The offending code is in the quote_string function of
> vtkWrapPython.c.  Why not bump up the allowed maxlen to a very large
> number so that 99% of the docs are not truncated, like say
> VTK_UNSIGNED_SHORT_MAX??  Or is there something that i am missing.

On Visual C++, the maximum length of a string constant is 4096, so
that's where I made the cutoff.  The other option was to break
the docstrings into several pieces and then write some code to
stitch the pieces together and put them in the right place when
the module is initialized.

It might be an idea to only impose the 4096 char limit on Windows,
since most compilers allow string constants of arbitrary length.

 - David




More information about the vtk-developers mailing list