Abu Ya'qub said: "If the blood returns to her within the forty days, then the precaution for her and the way to act with confidence is that she should make up her fasting," meaning: if she had fasted during her period of purity before the forty days.
Abu Ya'qub said: "Because the forty days is a known duration for her, and it is possible for a woman to become pure before her time. Some have said: A woman might become pure in a week, and she might become pure in two weeks. If that is her state, she should perform ghusl, pray, and perform wudu for every prayer, or combine two prayers with one ghusl. Her postpartum state in terms of fewer or greater number of days has become similar to that of a menstruating woman, except for what we have clarified, that the maximum of her time is forty days(1), and no such limit is set for menstruation. Furthermore, Malik ibn Anas and others among the scholars of the Hijaz hold that if the blood continues, she may refrain for up to two months, yet no sunnah is valid in their madhhab regarding this, save for what we mentioned from some of the Tabi'in, and an agreed-upon sunnah is not annulled except by a similar one. The nature of women regarding postpartum bleeding varies just as it does for menstruation; some of them are quicker to reach purity than others."
667 - Muhammad ibn al-Wazir narrated to us, saying: Al-Walid ibn Muslim narrated to us, saying: I said to Abu 'Amr: The people of the Damascus Mosque say: The minimum postpartum period for a boy is thirty nights, and for a girl is forty nights? He said: "Some of them used to say that, but we say: The limit for her, whether for a boy or a girl, from the one who has given birth before and whose cycle of purity has become established, is her first timing, whatever it was."
(1) Thus it is in the original text, but the correct reading is "the forty days."