Richterrettich / rpm-rs

A pure rust library for building and parsing RPM's
Other
39 stars 18 forks source link

rpm-rs uses signed integers for unsigned data fields #53

Open dralley opened 2 years ago

dralley commented 2 years ago

RPM tags only use unsigned integer types despite calling them "int":

https://github.com/rpm-software-management/rpm/blob/dd4f2c68a0059d66b1807d504faaeed84973d49a/docs/manual/tags.md#scalar-types=

https://github.com/rpm-software-management/rpm/blob/c4a6a3a9a6b664fd7b7f3d06dd23b93d0b1b4a1b/include/rpm/rpmtd.h#L223=

But many accessors e.g. get_epoch(), get_install_time() return signed integers and many structs (e.g. IndexData) are using signed integers. I'm not sure this is correct.