<p><a href="https://gerrit.osmocom.org/9439">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/9439/1/src/osmo_ss7.c">File src/osmo_ss7.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/9439/1/src/osmo_ss7.c@1923">Patch Set #1, Line 1923:</a> <code style="font-family:monospace,monospace">__attribute__((weak))</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">the introduction of a weak symbol  for overloading is of course a bit controversial. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">To be honest, it's the first time I see this, I was not aware it existed.</p><p style="white-space: pre-wrap; word-wrap: break-word;">According to wikipedia https://en.wikipedia.org/wiki/Weak_symbol:<br>"Weak symbols are not mentioned by the C or C++ language standards; as such, inserting them into code is not very portable. Even if two platforms support the same or similar syntax for marking symbols as weak, the semantics may differ in subtle points, e.g. whether weak symbols during dynamic linking at runtime lose their semantics or not."</p><p style="white-space: pre-wrap; word-wrap: break-word;">For instance, it seems the syntax and behavior when compiling with MSVC++ (eg. to run in MS Windows) is different from that of GCC.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I think the best (more portable, more clear) would be to have a function callback pointer and have an API to set it. Set it by default to osmo_ss7_asp_rx_unknown. Maybe rename it to osmo_ss7_asp_rx_unknown_default? (and make it static).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/9439">change 9439</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9439"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I8616f914192000df0ec6547ff4ada80e0f9042a2 </div>
<div style="display:none"> Gerrit-Change-Number: 9439 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 06 Jun 2018 09:37:26 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>