Attention is currently required from: arehbein, daniel, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email ) Change subject: osmo_io: Remove union in struct osmo_io_ops ...................................................................... Patch Set 4: (1 comment) Patchset: PS4:
I disagree that we should put the burden of this onto the user. It's an easy enough mistake to make. […] So you set mode (which is usually a hardcoded value in the code), and then an ops, which is also a hardcoded struct pointing to known functions, which is a union known by the user of the API.
To me it's fine. To me what you say it's like making a claim that you open an AF_INET socket and then something is wrong becuase you pass an AF_INET6 address to some API... I agree it would be nice to have more protection there, but current state is good enough for me, specially since changing it has the 2 drawbacks I mentioned early (ABI break, more memory needed per fd). That's my current opinion, let's see if other have other opinions here. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I138d57843edc29000530bb7896bcb239002ecbec Gerrit-Change-Number: 35079 Gerrit-PatchSet: 4 Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: arehbein <arehbein@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: daniel <dwillmann@sysmocom.de> Gerrit-Comment-Date: Thu, 30 Nov 2023 15:38:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Comment-In-Reply-To: daniel <dwillmann@sysmocom.de> Gerrit-MessageType: comment