Message208616
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):
PyDoc_VAR(winsound_PlaySound__doc__);
Here's a bit more info on the error: http://msdn.microsoft.com/en-us/library/c13wk277%28v=vs.100%29.aspx
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:43 | zach.ware | set | recipients:
+ zach.ware, larry |
2014-01-21 06:05:43 | zach.ware | set | messageid: <1390284343.93.0.69163024688.issue20323@psf.upfronthosting.co.za> |
2014-01-21 06:05:43 | zach.ware | link | issue20323 messages |
2014-01-21 06:05:43 | zach.ware | create | |
|