Message206105
> 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 |
|
Date |
User |
Action |
Args |
2013-12-13 16:11:42 | vstinner | set | recipients:
+ vstinner, larry, skrah |
2013-12-13 16:11:42 | vstinner | set | messageid: <1386951102.95.0.266878013424.issue19976@psf.upfronthosting.co.za> |
2013-12-13 16:11:42 | vstinner | link | issue19976 messages |
2013-12-13 16:11:42 | vstinner | create | |
|