[Cython] Syntax for writing C macros in a Cython .pxd
Neal Becker
ndbecker2 at gmail.com
Sun Mar 23 12:13:08 CET 2008
Stefan Behnel wrote:
> Hi,
>
> Martin C. Martin wrote:
>> Stefan Behnel wrote:
>>> Well, in most cases macros are rather short code snippets, not function
>>> replacing code blocks. So I don't care about their symbols.
>>
>> That's surprising to me. Don't you think you'd want to step through
>> even short snippets in a debugger? To have them show up as a separate
>> item in a profile, rather than spread around all the places that call
>> them? Same with memory leaks or corruption?
>
> Again: there are valid use cases for macros. They are mostly for speed,
> not for improved debugability.
>
I don't see this argument. There is no speed advantage of macros over
inline, providing your compiler supports inline. Maybe you're talking
about C compilers that don't support inline?
More information about the Cython-dev
mailing list