As I wander around the code base, I keep seeing macro definitions in
the C code. For example, there are four CALL* macros defined in
Python/ast_opt.c which contain not entirely trivial bits of syntax.
That code is from 2017 (as compared to, say, Modules/audioop.c, which
first saw the light of day in 1992) I see the inline keyword used
unconditionally in many places.

I don't think stable code which uses macros should be changed (though
I see the INCREF/DECREF macros just call private inline functions, so
some conversion has clearly been done). Still, in new code, shouldn't
the use of macros for more than trivial use cases (constant defs,
simple one-liners) be discouraged at this point?

Skip
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/AVF6W3PMCAQK73NXOXHMHNW2KP7FJOIJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to