Share some code between OBJECT and STRUCT.