A recent generalization of the Kalman-Yakubovich-Popov (KYP) lemma establishes the equivalence between a semi-infinite inequality on a segment of a circle or straight line in the complex plane and a linear matrix inequality. In this paper we further generalize the KYP lemma to particular curves in the complex plane, described by a polynomial equality and a polynomial inequality that satisfy certain conditions. The considered set of curves is shown to include the union of segments of a circle or line as a special case.