Message208616
| Author |
zach.ware |
| Recipients |
larry, zach.ware |
| Date |
2014年01月21日.06:05:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1390284343.93.0.69163024688.issue20323@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|