This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients larry, zach.ware
Date 2014-01-21.06:05:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The current two-pass output for the two-pass preset causes compile errors on Windows.  A sample:

..\PC\winsound.c(71): error C2133: 'winsound_PlaySound__doc__' : unknown size

Line 71 (clinic-generated docstring_prototype):


Here's a bit more info on the error:

There are a few viable alternatives that I can see.

1) Give PyDoc_VAR a reasonable default size.  I don't like this; it seems fragile.

2) Remove docstring_prototype as an outputtable entity.  I don't like this much either, it should be a reasonable thing to do.

3) Add a new PyDoc_SIZEDVAR macro, taking name and size.  Argument Clinic will know the needed size and can fill it in, but it would be largely useless for manual usage.  I think this is my preferred route.

4) Instead of reusing PyDoc_VAR (or a new PyDoc_SIZEDVAR), just have Clinic output the whole expanded macro, with size; e.g. "static char winsound_PlaySound__doc__[195]".  This does have the downside that any future change to docstrings that would have been a simple change to the macro would have to be done in Argument Clinic, with lots of churn in every clinicized file.

Here's a patch that implements option 3.
Date User Action Args
2014-01-21 06:05:43zach.waresetrecipients: + zach.ware, larry
2014-01-21 06:05:43zach.waresetmessageid: <>
2014-01-21 06:05:43zach.warelinkissue20323 messages
2014-01-21 06:05:43zach.warecreate