Update pet.h with the up-to-date one from ppcg