<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’d generally prefer functions over macros — I think that the ctrl calls e.g. would be better wrapped with function to provide type checking.<div class="">The overhead of a function call is pretty light these days so inline functions are difficult to justify (as anything except a premature optimisation?).</div><div class=""><br class=""></div><div class="">Both safestack and lhash are problematic cases.  The inline functions come from macros which I view as okay.  The problem is that some of these macros are expanded in the header for common cases (e.g. stack of stings).  We could address this by distinguishing between the function declarations and their instantiation and move the latter into its own C file.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Pauli<br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">-- <br class="">Dr Paul Dale | Cryptographer | Network Security & Encryption <br class="">Phone +61 7 3031 7217<br class="">Oracle Australia</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 27 Jan 2019, at 8:33 pm, Tim Hudson <<a href="mailto:tjh@openssl.org" class="">tjh@openssl.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">From <a href="https://github.com/openssl/openssl/pull/7721" class="">https://github.com/openssl/openssl/pull/7721</a></div><div class=""><br class=""></div><div class="">Tim - I think inline functions in public header files simply shouldn't be present.</div><div class="">Matt - I agree</div><div class="">Richard - I'm ambivalent... in the case of stack and lhash, the generated functions we made static inline expressly to get better C type safety, and to get away from the <a href="http://mkstack.pl/" target="_blank" class="">mkstack.pl</a> horror.</div><div dir="ltr" class=""><br class=""></div>It would be good to get a sense of the collective thoughts on the topic.</div><div dir="ltr" class=""><br class=""></div><div class="">Tim.</div><div class=""><br class=""></div></div>
_______________________________________________<br class="">openssl-project mailing list<br class=""><a href="mailto:openssl-project@openssl.org" class="">openssl-project@openssl.org</a><br class="">https://mta.openssl.org/mailman/listinfo/openssl-project</div></blockquote></div><br class=""></div></body></html>