[api] improve the patchinfo class a bit