STINNER Victor added the comment:
> We could call the macro PY_UNUSED or something.
I would prefer Py_UNUSED name. This sounds like a nice addition to
Include/pymacros.h.
In C++, you can omit the parameter name, so the macro should take the parameter
name: Py_UNUSED(name). Example:
int foo(int Py_UNUSED(bar)) { return 1 }
In Visual Studio, you can use:
#define Py_UNUSED(NAME) __pragma(warning(suppress:4100)) NAME
For Clang, you can try:
#define Py_UNUSED(NAME) _Pragma(diagnostic ignored "-Wunused") NAME
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19976>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com