[issue19976] Argument Clinic: generate second arg for METH_NOARGS

STINNER Victor report at bugs.python.org
Mon Dec 16 09:50:34 CET 2013


STINNER Victor added the comment:

> The Visual Studio pragma disables for the rest of the file, which is undesirable.  Maybe we could turn it on and off inline, but it's not clear to me that that would have the desired effect of turning off the warning for explicitly that parameter declaration.

Oh, I didn't know that it is file-wide. There are
__pragma(warning(push)) and __pragma(warning(pop)) commands to disable
a pragma. I don't know it is can be used using Py_UNUSED(name) macro
(is it possible to "pop" the pragma before the function body?).

If a compiler does not provide a syntax to disable the warning just in
one function, the warning should be disabled for the compilation of
the whole project.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19976>
_______________________________________


More information about the Python-bugs-list mailing list