extract_ptype function

Extract a prototype