<p style="white-space: pre-wrap; word-wrap: break-word;">An opaque data structure indeed sounds like a good solution ABI wise.</p><p style="white-space: pre-wrap; word-wrap: break-word;">A drawback is that we can't embed such an opaque struct directly in other structs: we would need dynamic allocation again, which I'd rather avoid.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I skimmed this and the previous patch for usage:</p><ul><li>It is used in a few structs that are talloc'd, so it would be ok to allocate as talloc child.</li><li>Also used as local variables in a handful of locations, where it would rapidly allocate/deallocate. (Some of those could be replaced by API skipping an allocation?)</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">Anyway, it's a tradeoff. Maybe rather have a future proof data structure that is transparent.</p><p style="white-space: pre-wrap; word-wrap: break-word;">My biggest problem here is the open question how that future might look. I imagine that such a future would anyway be completely separate / orthogonal to the GSUP API and that we would do plain API bloat here for no good reason.</p><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/16459">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/16459">change 16459</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/osmo-hlr/+/16459"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ide9dcdca283ab989240cfc6e53e9211862a199c5 </div>
<div style="display:none"> Gerrit-Change-Number: 16459 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </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: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 29 Apr 2020 22:22:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>