open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.92k stars 466 forks source link

Use OQS_*_set_callbacks instead of C_OR_NI_OR_ARM macros #1842

Open SWilson4 opened 4 months ago

SWilson4 commented 4 months ago
          This isn't something to change in this PR, but something I noticed just from looking at this code during review.  Now that we have the ability to set callbacks, could we get rid of the `C_OR_NI_OR_ARM` macros and instead set the callbacks once (either during library init, or alternatively on first use if it's not set)?  Again: not something to do in this PR, but if anyone else thinks it might be good, we could create a separate issue to track.

_Originally posted by @dstebila in https://github.com/open-quantum-safe/liboqs/pull/1707#discussion_r1674441978_

See also: #1599, #1832