This doesn't actually add any mallocs that were not there before for the busy
case of rpmds comparisons: previously the strings were strdup()'ed in
rpmdsCompareEVR() before passing to parseEVR(), now this is happens in rpmevr.c
instead. The ver handle is all alloced as a single blob so there's no added
cost (except for some error checking).
As for rpmds and string pool, all good questions that occurred to me too, but I
don't have immediate answers. It'd seem attractive to run the rpmds versions
through this just for enforced error checking, but then those are in the
strpool, and the pool has its own non-trivial cost, and the private pool trick
we use elsewhere seems way out of proportion for storing a couple of tiny
strings.
My excuse for ripping epoch promotion from Python but leaving the ruins in C is
basically just that in C, removing would require soname bump, but Python has
nothing of the sort. I can certainly put it back there if you prefer.
BTW, last fixup added support for python (e,v,r) tuples as a way of creating
version objects, I initially pushed the python bindigs a little bit too hastily
:)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1221#issuecomment-634576339
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint