>>
>> * inline function
>> static inline function can be used instead of may macros.
>> It is more readable, and type safe.
>
> My experience from a few months ago with some cross-platform code is
> that clang, GCC and MSVC have different ideas about how inline
> functions in C work. Are they static or extern? Do you need provide an
> implementation body somewhere?

You're right. I think inline function should be used as "static inline" always.

Python uses "static inline" already, via "Py_LOCAL_INLINE" macro, when
USE_INLINE is defined. So using "static inline" is not problem.

If we can assume inline is usable, we can remove the macro, and use
"static inline"
more often to replace macros.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to