> In general macro definitions in nginx are used everywhere for > efficiency reasons
Clang inlines short functions with -O1, and GCC does so with -O2 or -O1 -finline-small-functions. Are there any platforms that Nginx needs to support for which short function inlining isn't sufficient to solve this issue? > While some might prefer other approaches, writing code like > "ngx_memcpy(dst, src, ++len)" in nginx is just wrong, and > shouldn't be trusted to work, much like it won't work with > "ngx_cpymem(dst, src, ++len)". It is indeed wrong to use an expression with a side-effect in an argument to cpymem, but it's also not very obvious that it's wrong. An inlined function solves the argument reevaluation issue without performance overhead. -Ben _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel