Merge "Fix C compatibility in new API." into main