Build fix for libpython.
Fix crash in TimePeriod::UpdateRegion().
Fix perfdata macros.