Message209659
Actually, forget about the file output preset. It wouldn't work for posixmodule. > 80% of the entry points are #ifdef conditional on platform functionality. Which means the Clinic generated stuff needs to be #ifdef too.
It wouldn't be that hard to add the ability to #ifdef your generated code... but then what? Should it generate an #endif too, right before the end of the block?
If it closed the #ifdef, then it'd look dumb:
/*[clinic input]*
ifdef HAVE_WHATNOT
os.whatnot
[clinic start generated code]*/
#ifdef HAVE_WHATNOT
...
static PyObject *
os_whatnot(PyModuleType *)
#endif /* HAVE_WHATNOT */
/*[clinic end generated code: output=... ]*/
#ifdef HAVE_WHATNOT
{
...
}
#endif /* HAVE_WHATNOT */
If it didn't close the #ifdef, well, that looks dumb too:
/*[clinic input]*
ifdef HAVE_WHATNOT
os.whatnot
[clinic start generated code]*/
#ifdef HAVE_WHATNOT
...
static PyObject *
os_whatnot(PyModuleType *)
/*[clinic end generated code: output=... ]*/
{
...
}
#endif /* HAVE_WHATNOT */
though maybe that's less dumb. |
|
Date |
User |
Action |
Args |
2014-01-29 17:27:04 | larry | set | recipients:
+ larry |
2014-01-29 17:27:04 | larry | set | messageid: <1391016424.61.0.88301611796.issue20170@psf.upfronthosting.co.za> |
2014-01-29 17:27:04 | larry | link | issue20170 messages |
2014-01-29 17:27:04 | larry | create | |
|