<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25464">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/libosmocore/+/25464/5/include/osmocom/core/stat_item.h">File include/osmocom/core/stat_item.h:</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/libosmocore/+/25464/5/include/osmocom/core/stat_item.h@17">Patch Set #5, Line 17:</a> <code style="font-family:monospace,monospace">struct osmo_stat_item_period {</code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">i used to be a big fan of opaque structs, but every time i used them it became a big cumbersome api bloat</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Well it depends on the case. for the connection structs in libosmo-netif, having opaque structs proved to be a good way. We could extend functionalities several times without breaking ABI compatiblity.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>> Derefernces of osmo_stat_item: osmo_stat_item_handler() in stats.c uses item->desc</p><p style="white-space: pre-wrap; word-wrap: break-word;">Code inside libosmocore can still access members directly, that's not a poroblem, that's why I was mentioning moving the structs to an internal header instead of the .c file.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Callers outside of libosmocore [...] appears though that no osmocom code outside of libosmocore is doing so</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I don't expect code outside of libosmocore to access those, that's why I'm mentioning about making a opaque struct. If somebody anypoint in time needs more access, APIs can be added.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I also had to break the ABI lately around these structs, and had to add an API to avoid breaking it in the future. That's why I'm saying t looks like a good moment to make the structs opaque.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not blocking the merge of this patch as it is, I just want to raise my concerns in order to avoid similar issues in the future.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25464">change 25464</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/c/libosmocore/+/25464"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I137992a5479fc39bbceb6c6c2af9c227bd33b39b </div>
<div style="display:none"> Gerrit-Change-Number: 25464 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 29 Sep 2021 10:53:25 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>