Don't have a P40, but my inclination would be the same cut that worked for P-11 would work for a P40. Didn't somebody say the early P40 mags were P-11 mags?
Anyway, here ya go. The mag is an old Ram-Line 18 rounder with the wind-up style spring (that's the silver metal you see thru the mag catch holes), which was handy for me. Same principle applies with Beretta mags.
Top hole is for a S&W SD9VE, middle is P-11, and third one is the OEM Beretta 92F slot. Hole chunked out at lower left is for Beretta 92S heel catch.