How to get the material list from meta, curves and nurbs

Does anybody know how to get the material list from a meta, curves and nurbs object in Blender 2.40-2.42a?