Closed joseluis closed 3 years ago
whooooooa there homie; why are you exporting anything from termdesc.h
? that's not installed, and is not suitable for external inclusion.
whooooooa there homie; why are you exporting anything from
termdesc.h
? that's not installed, and is not suitable for external inclusion.
not exporting that, just diving into the rabbit hole from the public api to see the root of the declared types... I wasn't sure whether just casting to u16 was enough.
Is what I actually did in the commits ok?
Is what I actually did in the commits ok?
no. you've broken ABI compatibility, i believe.
a program already compiled against notcurses will be expected an unsigned to be returned. without a recompile, it will handle the new, likely smaller return value improperly.
also, whenever you change public function signatures, they need be updated in the USAGE.md and man pages in doc/man/man3.
I'm sorry, I've reverted the changes.
I'm sorry, I've reverted the changes.
no problem, man, thanks!
Would you like to leave this open to tackle this somewhen in the future?
I've gone ahead and added this to #1777, where I'm listing all the things to change upon movement to ABI3. I'l go ahead and close this one up. In the meantime, you may assume that no values greater than 0xffff will be returned from these functions.
I started fixing
ncdirect_styles
parameter to be const, like the analogousncplane_styles
function, but then I've found more related things I could fix a little. So I changed the return type touint16_t
for the public API functions that return a stylemask. Those arenccell_styles
,ncdirect_styles
,ncdirect_supported_styles
andnotcurses_supported_styles
.What I've not dared to change are the private
unsigned supported_styles
field from thetinfo
structure in thetermdesc.h
file, nor theterm_supported_styles
return type, but maybe they ought to be updated too.