[Python-Dev] How do we feel about using pragmas and __attribute__ in C code?
Stefan Krah
stefan-usenet at bytereef.org
Fri Dec 13 18:27:08 CET 2013
Brett Cannon <brett at yvrsfo.ca> wrote:
> So is there any reason to not use pragmas sparsely in the code?
I'm +1 on using pragmas for suppressing selected warnings.
> Tying into this and using compiler-specific things in C code, what about
> __attribute__? http://bugs.python.org/issue19298 proposes an idea that Daniel
> Stutzbach originally came up with where we could use __atribute__ (behind a
> nicer macro) to help detect refleaks on PyObject* stack variables. Would
> __attribute__ usage be okay in that situation?
I would have to see an example function, mostly to get an idea of how
readable the code is.
Stefan Krah
More information about the Python-Dev
mailing list